npm.io
0.0.19 • Published 6 years ago

use-scroll-event

Licence
MIT
Version
0.0.19
Deps
0
Size
6 kB
Vulns
0
Weekly
0

use-scroll-event

A scroll event hook for React that tracks page position and detects active scrolling.

Installation Instructions

$ yarn add use-scroll-event

Example

import { useScrollEvent } from "use-scroll-event";

function App() {
  // detectScrolling: optional for scrolling detection - optimization
  const { scrolling, x, y } = useScrollEvent({ detectScrolling: true });
}

Keywords