Event Handling
useDocumentEventListener
About
A react hook to an event listener to the document object
Examples
Arguments
| Arguments | Type | Description | Default value |
|---|---|---|---|
| eventName | string | The event to track | undefind |
| callback | function | The callback to be called on event | undefined |
| conditions | object | The options to be passed to the event listener | |
| isLayoutEffect | boolean | Should it use layout effect. Defaults to false | false |
Return
No return value.