Implement a useClickAnywhere hook that handles click events anywhere in the browser window.
useClickAnywhere
export default function Component() { const [count, setCount] = useState(0); useClickAnywhere(() => { setCount((prev) => prev + 1); }); return <p>Click count: {count}</p>;}
handler: (event: MouseEvent) => void
Nothing.
console.log()