react scroll to element on page load code example
Example: page is loading from previous page scroll in reactjs
//this piece of code will resolve this issue. in Reactjs.
componentDidMount() {
window.scrollTo(0, 0)
}
//this piece of code will resolve this issue. in Reactjs.
componentDidMount() {
window.scrollTo(0, 0)
}