Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

scroll to top in react

componentDidMount() {
  window.scrollTo(0, 0)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #scroll #top #react
ADD COMMENT
Topic
Name
7+1 =