react-use-scroll-position
A react hook to use scroll position.
Usage
In a React functional component:
;// Usually you would just need to import one of the following;
In a custom React hook
;
Implementation details
The scroll event handler is throttled by requestAnimationFrame
.