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

Tiny asynchronous action timer.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
increased by1100%
Maintainers
1
Weekly downloads
 
Created
Source

mounty

A tiny React mount/unmount transition manager with a familiar API. ~500bytes gzipped.

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}>
        {({ mounted, active, entering, entered, exiting, exited }) => {
          return (
            <div
              style={{
                opacity: active ? 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 © Eric Bailey

FAQs

Package last updated on 01 Nov 2019

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