useScrollDirection
Detect the user scroll direction on the window or a target element.
This will apears when you scroll up.
Type Definitions
const useScrollDirection: <T extends HTMLElement = HTMLDivElement>(ref?: React.RefObject<T> | null) => {
isUp: boolean;
isDown: boolean;
isLeft: boolean;
isRight: boolean;
ref: React.RefObject<T>;
};