Skip to content

manpenaloza/use-is-scrolled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A react hook to detect whether a user has already scrolled on a page or entered a page at a lower section.

I needed a way of detecting whether the user has scrolled. The main idea of how this hook is built was taken from this livestream (starting at about 46:00) done by Max Stoiber.

Usage

Using npm:

  npm install use-is-scrolled

Using yarn:

  yarn add use-is-scrolled

After installation, in your react component:

  import useIsScrolled from "use-is-scrolled"

  // from within your react component and receive true or false
  const isScrolled = useIsScrolled();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published