0

How do I make the redirected page to always show from top instead of the last scroll view offset from the previous page by using history.push() ? I can't use a redirection in my code because it will refresh the new page and the redux state will lost.

EDIT - SOLUTION

Found this discussion here to always scroll to top in router react-router scroll to top on every transition

I'll leave it here in case someone else is looking for solution.

Leon
  • 301
  • 2
  • 3
  • 13
  • [react-router scroll to top on every transition](https://stackoverflow.com/questions/36904185/react-router-scroll-to-top-on-every-transition) – Yushan Jul 14 '21 at 05:03

0 Answers0