useScrollDirection

Know whether the page is being scrolled up or down.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

Scroll the page to see the value change.

APIs

useScrollDirection

const useScrollDirection = () => 'up' | 'down'
Edit this page on GitHub