A scroll event hook for React that tracks page position and detects active scrolling.
npm install use-scroll-eventA scroll event hook for React that tracks page position and detects active scrolling.
``bash`
$ yarn add use-scroll-event
`typescript
import { useScrollEvent } from "use-scroll-event";
function App() {
// detectScrolling: optional for scrolling detection - optimization
const { scrolling, x, y } = useScrollEvent({ detectScrolling: true });
}
``