rehooks/ideas

useHover

are opened this issue · 0 comments

are commented

Simple hook that allows you to get current hover state.

 function MyComponent () {
    let ref = useRef(null)
    let isHovered = useHover(ref)
    
    return <div ref={ref}>{isHovered}</div>
 }

Link to a repository: https://github.com/are1000/hover