use-scroll-event
TypeScript icon, indicating that this package has built-in type declarations

0.0.19 • Public • Published

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 });
}

Package Sidebar

Install

npm i use-scroll-event

Weekly Downloads

22

Version

0.0.19

License

MIT

Unpacked Size

6.09 kB

Total Files

6

Last publish

Collaborators

  • jeffmendez