Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

scroll to top in react

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