JSFiddle - React, Tailwind, and code Playground
HTML
<div id = "top">
</div>
<div id = "bottom">
</div>
JavaScript
function top() {
document.getElementById( 'top' ).scrollIntoView();
};
function bottom() {
document.getElementById( 'bottom' ).scrollIntoView();
window.setTimeout( function () { top(); }, 2000 );
};
bottom();