Seems like the same issue as #121 exists again with v2. Is there a good reason it was dropped? Is it intentional for us to have to add
componentDidUpdate() {
this.getDOMNode().scrollTop = 0 ;
},
to every component?
Dupe of a ton of other issues, search around.
Adding the onUpdate to your router stops you from having to add the event to each component
<Router onUpdate={() => window.scrollTo(0, 0)} history={history}>
{routes}
</Router>
Most helpful comment
Adding the
onUpdateto yourrouterstops you from having to add the event to each component