use-smooth-scroll
use-smooth-scroll copied to clipboard
React hook which gives a smooth scrolling function.
I am getting the following compilation issue when using use-smooth-scroll ../node_modules/use-constant/dist/use-constant.esm.js Module not found: Can't resolve 'react' in '/Users/me/myproject/node_modules/use-constant/dist'
'useSmoothScroll' is trying to access the window object on server-side. just importing the package in a component would result to this error, I tried to require and run it inside...
It would be nice to do custom easing like below. ``` scrollTo(0, {duration: 1000, easing: [0.43, 0.13, 0.23, 0.96]) ```
I believe this would be a very useful feature since diferent scroll content/distances would (in certain scenarios) work best with custom scroll durations. Let me know and I might submit...