clear window scrollto with useeffect(() = window.scrollto(0 0) ) code example
Example 1: scroll to top in react
componentDidMount() {
window.scrollTo(0, 0)
}
Example 2: make page refresh on top in react js
onUpdate={window.scrollTo(0, 0)}
componentDidMount() {
window.scrollTo(0, 0)
}