react detect when page is loading 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)
}