React hook which gives a smooth scrolling function.
npm install use-smooth-scrollReact hook which gives a smooth scrolling function.
``js
const Example = () => {
const ref = React.useRef()
const scrollTo = useSmoothScroll('x', ref)
return (
<>
{range(100).map(i => (
))}
>
)
}
``