react-recipes
Version:
A React Hooks utility library containing popular customized hooks
20 lines (13 loc) âĸ 413 B
Markdown
when the mouse if hovering over an element
- `hoverRef: Ref`: add this to the desired hover element
- `isHovered: Bool`: Whether or not the mouse is currently hovering over element
```js
import { useHover } from "react-recipes";
function App() {
const [hoverRef, isHovered] = useHover();
return <div ref={hoverRef}>{isHovered ? "đ" : "âšī¸"}</div>;
}
```
Know