score:0

Accepted answer

if you're already using react, i would suggest doing your scrolling in a declarative way, instead of manipulating the dom yourself.

check out something like react-scroll.

it allows you to do stuff like:

scroll.scrollmore(100)

just pop that in whatever lifecycle event you want.

score:0

if you want to do window scroll to some specific position then maybe consider use url anchor.
check here how to use url anchor

if you try to have "transition" effect while scrolling, then consider use "transform" instead of scrolling.(this is more suitable for scroll inside an element, not window itself)


Related Query

More Query from same tag