You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
History would be much more useful if it passed action argument to the listen callback just like the package from react-router does, unless I'm misusing this router and it has different means to get the data.
I wanted to port a hook that scrolls to the top of the page from react-router@5 and it doesn't look like it's possible (other than monkey-patching history.pushState and history.replaceState):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
History would be much more useful if it passed
action
argument to thelisten
callback just like the package fromreact-router
does, unless I'm misusing this router and it has different means to get the data.I wanted to port a hook that scrolls to the top of the page from
react-router@5
and it doesn't look like it's possible (other than monkey-patchinghistory.pushState
andhistory.replaceState
):Beta Was this translation helpful? Give feedback.
All reactions