Migration instructions from react-router@3
See original GitHub issueIssue Description
Hey, great project!
We use react-router@3
at the moment, but not really sure if migrating to @4
is going to happen any time soon, if ever. So, found
looks like a great alternative as soon as some migration instructions from react-router will be available — I’m sure lots of people will appreciate that. Thanks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Migrating React v15.5 to v16.8 and react-router v3 to v5
This post might help you with the migration and it also includes other packages that you might need to update.
Read more >Moving from react router 3.x to 4.x - Stack Overflow
You will be able to take routes one-by-one and migrate them to the new API. Additionally, the config addon mentioned above may help...
Read more >Migrating React Router from 3 to 4 | Blog
I was working on understanding how to make React relevant beyond a single page app, and I came across this tutorial by Krithika...
Read more >Upgrading from v5 v6.6.1 - React Router
The following is a detailed breakdown of each step that should help you migrate quickly and with confidence to v6. Upgrade to React...
Read more >Migrating your React Router App to Remix
First, you'll need a few of our packages to build on Remix. Follow the instructions below, running all commands from the root of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good idea. For now, the capsule summary is:
getChildRoutes
andgetIndexRoute
are gone; no replacement intended in the near futureComponent
as the property rather thancomponent
foo/:optionalParam?
instead offoo(/:optionalParam)
getComponent
doesn’t take a callback for async any more; if you want it to be async, return a promiseonEnter
andonChange
are gone; you can do the same thing inrender
now by throwing aRedirectException
, but you have to also return the element (by default just<Component {...props} />
if both are resolved)onLeave
is gonerouter.addTransitionHook
now, and they trigger on any navigationresolveElement
andrender
on the router)<Provider>
by default; you’ll need to enhance your store per the docs if you’re using your own Redux store@taion Why the removal of
onEnter
andonLeave
? I can see how the introduction ofgetData
andrender
reduces the need for such explicit hooks, but I can still imagine some use cases for them (i.e. triggering an action to reset some redux state when the user leaves a given route).