Answers for "scroll to the top of the page after render in react.js"

6

scroll to top in react

componentDidMount() {
  window.scrollTo(0, 0)
}
Posted by: Guest on August-28-2020
2

scroll to top in react

useEffect(() => {
  window.scrollTo(0, 0)
}, [])
Posted by: Guest on August-28-2020

Code answers related to "scroll to the top of the page after render in react.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language