Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mounty

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mounty

A tiny React transition manager with mount/unmount support and a familiar API.

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mounty npm

A tiny React transition manager with mount/unmount support and a familiar API.

Install

npm i mounty --save

Usage

The code below is demoed here.

import { Mounty } from "mounty";

function App() {
  const [active, setActive] = React.useState(false);

  return (
    <>
      <button onClick={() => setActive(!active)}>Click to Pin</button>

      <Mounty in={active} timeout={400} shouldUnmount={true}>
        {({ active, ready, entering, entered, exiting, exited }) => {
          return (
            <div
              style={{
                opacity: ready ? 1 : 0,
                transition: "opacity 400ms"
              }}
            >
              I'm automatically mounted & unmounted, and I fade in and out while
              doing it!
            </div>
          );
        }}
      </Mounty>
    </>
  );
}

render(<App />, document.getElementById("root"));

License

MIT License © Truework

Keywords

FAQs

Package last updated on 03 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc