use-window-scroll
Subscribe to window scroll and scroll smoothly to given position
Import
Source
Docs
Package
Usage
use-window-scroll returns current scroll position and a function to scroll smoothly to given position:
Scroll position x: 0, y: 0
use-window-scroll returns current scroll position and a function to scroll smoothly to given position: