How to control Scroll in react

148 views Asked by At

I want to control scroll in my react app. Let's say I have a div box of 500vh and inside that box I have 5 divs of 100vh each. I want that when the user scrolls it goes down from 100vh and so on. Same way when the user scroll up it goes up 100vh etc ..

<div id='box-wrapper'>
   <div id='box-1'/>
   <div id='box-2'/>
   <div id='box-3'/>
   <div id='box-4'/>
   <div id='box-5'/>
</div>

Is there a way to do so? Because I've searched a lot and I couldn't find anything.

0

There are 0 answers