Implement a hook useClickOutside(ref, callback) that detects clicks outside of a specified element.
The hook should:
Example
const ref = useRef(null); useClickOutside(ref, () => { console.log("Clicked outside!"); });
JavaScript Function
No test results yet
Click "Run" to execute tests