how to bring user to the top of the screen in reactjs code example
Example 1: make page refresh on top in react js
onUpdate={window.scrollTo(0, 0)}
componentDidMount() {
window.scrollTo(0, 0)
}
Example 2: how to make page scroll to the top jsx
componentDidMount() {
window.scrollTo(0, 0)
}