useIsHoveredDetects if given element is hoveredUsage import { useIsHovered } from 'hook-master-react'; function Demo() { const { hovered, ref } = useIsHovered(); return ( <div ref={ref}> {hovered ? 'I am hovered' : 'Hover on me'} </div> ); } Definition function useIsHovered<T extends HTMLElement = HTMLDivElement>(): { ref: React.RefObject<T>; hovered: boolean; };PrevioususeInputStateNextuseIsMobile