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.
Scroll the page to see the value change.
const useScrollDirection = () => 'up' | 'down'