JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div1" style='height:400px;' >
<button type="button" onclick="goto_div2()" >Goto Div2</button>
</div>
<div id="div2" style='height:400px;'>
Div2
</div>
JavaScript
function goto_div2()
{
var elmnt = document.getElementById("div2");
elmnt.scrollIntoView();
}