I am currently using JQuery in Reactjs for scrolling. I realized that it is not a good idea to mix the two together and that it can be done with just React. However, I was wondering if someone could show me how to do the following in just React?
$("#sideOne").click(function () {
$('html, body').animate({
scrollTop: $("#first").offset().top
}, 2000);
});
<div id="mySidenav" class="sidenav">
<a href="#first" id="sideOne" class="pink">About</a>
<a href="#second" id="sideTwo" class="purple">Steps</a>
<a href="#fourth" id="sideThree" class="blue">Contact</a>
</div>
Thank you!