Implement a hook useHover(element) that tracks whether a given DOM element is currently being hovered.
The hook should:
Example
const ref = document.getElementById('button'); const isHovered = useHover(ref); console.log(isHovered); // true when mouse is over the element, false otherwise
JavaScript Function
No test results yet
Click "Run" to execute tests