react-composed-path

1.0.4 • Public • Published

React Composed Path

A React component for handling clicks outside of a component

import {useComposedPath} from 'react-composed-path'

Examples

Single use:

useComposedPath('#box', '#button', setVisible)

Multiple use:

useComposedPath(['#box1', '#box2'], ['#button1', '#button2'], [setVisible1, setVisible2])

Package Sidebar

Install

npm i react-composed-path

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

3.29 kB

Total Files

4

Last publish

Collaborators

  • serter1