Simple, accessible React hook for tracking hover state.
npm install use-hovering> Simple, accessible React hook for tracking hover state.


``sh`
npm install use-hovering
`jsx
import { useHovering } from 'use-hovering';
export const Example = () => {
const ref = React.useRef();
const hovering = useHovering(ref);
return (
$3
`jsx
import { useHovering } from 'use-hovering';export const Example = () => {
const ref = React.useRef();
const hovering = useHovering(ref, {
enterDelay: 250,
exitDelay: 250,
});
return (
Hover over me!{hovering && ' Hovering!'}
);
};
``