migrate from v5 to v7 history.listen #10523
Unanswered
StainsGate
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
in the react router v5 i use history library from remix to listen the browser back or forward how to achieve same thing in react router v7
const history = createBrowserHistory(); history.listen((location,action )=> { // do something when browser back or forward });
export the history and use it in Router
<Router history={history}>
Beta Was this translation helpful? Give feedback.
All reactions