Implement a hook useEventListener(target, event, handler) that allows subscribing to browser events.
The hook should:
Example
const handler = () => console.log('Clicked!'); useEventListener(document, 'click', handler); // When the user clicks anywhere in the document, 'Clicked!' is logged
JavaScript Function
No test results yet
Click "Run" to execute tests