top of page when component render react code example
Example: make page refresh on top in react js
onUpdate={window.scrollTo(0, 0)}
componentDidMount() {
window.scrollTo(0, 0)
}
onUpdate={window.scrollTo(0, 0)}
componentDidMount() {
window.scrollTo(0, 0)
}