Version: v3.6.0
#
@rooks/use-on-window-scroll#
A React hook for adding an event listener for window scroll
#
Installation#
Importing the hook#
Usage#
ArgumentsArguments | Type | Description | Default value |
---|---|---|---|
callback | function | Callback function which needs to run on unmount | undefined |
when | boolean | When the event handler should be active | true |