use-click-out
v1.0.2
Published
This custom hook is used to handle the click event outside of a referenced component.
Downloads
6
Readme
useClickOut - Custom Hook
This custom hook is used to handle the click event outside of a referenced component.
Usage
const callbackFunction = () => {
console.log("clicked outside !!");
};
const ref = useClickOut(callbackFunction);
<div ref={ref}>...children...</div>;