@r-hook/use-mouse-leave
v1.0.12
Published
Get notified when the mouse leaves a certain area.
Downloads
1
Readme
use-mouse-leave
Be notified when the mouse leaves an area.
import { useMouseAway } from "@r-rook/use-mouse-away";
const addIgnored = useMouseAway((e) => console.log("Area left!"));
<div>
<div ref={addIgnored(1)}></div>
<div ref={addIgnored(123)}></div>
<div ref={addIgnored("another-id")}></div>
</div>;