useHover()
The useHover() hook lets you detect if the user's mouse is hovering over an element
Import
import { useHover } from 'react-haiku';
Usage
import { useHover } from 'react-haiku';
export const Component = () => {
const { hovered, ref } = useHover();
return(
<button ref={ref}>
{hovered ? 'All mice on me!' : 'No mice on me!'}
</button>
);
}