Skip to content
Function

useWindowScroll

Current window scroll offset, plus a scrollTo helper.

See useWindowScroll with a live demo

@danixsoft/hooks


useWindowScroll(): [ScrollState, (y, x?) => void]

Returns

[ScrollState, (y, x?) => void]