react-offclick
v1.0.3
Published
To handle click outside of react elements.
Downloads
148
Readme
react-offclick
Detects clicks that exist outside of react component.
Installation
npm install react-offclick --saveUsage
import OffClick from 'react-offclick';
const MyComponent = props => {
return (
<OffClick handler={() => console.log('Clicked off the component!')}>
// rest of codes
</OffClick>
)
}That simple ;)
