Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

Upgrade to latest react-router (v4 beta) #356

Closed
ctrlplusb opened this issue Feb 12, 2017 · 11 comments
Closed

Upgrade to latest react-router (v4 beta) #356

ctrlplusb opened this issue Feb 12, 2017 · 11 comments

Comments

@ctrlplusb
Copy link
Owner

ctrlplusb commented Feb 12, 2017

@ryanflorence "promises" us that the API in the beta can be considered stable.

SSR checksum is currently broken though. Awaiting remix-run/react-router#4484

@strues
Copy link
Collaborator

strues commented Feb 12, 2017

Let's hope so! I've been delaying upgrading to RR4 anywhere as there's been so many changes. Yet to find a data loading technique that feels "right" with the new changes.

@carsonxyz
Copy link

I've been working around that bug all weekend. It's so frustrating that they moved the library into a subdirectory so you can't even target the branch to get the latest.

@ctrlplusb
Copy link
Owner Author

@carsonperrotti sorry to hear. It does sound like it will land soon though. 🤞

@diondirza
Copy link
Contributor

diondirza commented Feb 13, 2017

I suppose to mitigate this error you should install earlier beta.
Add this line into package.json will solve the issue for this time

"react-router": "4.0.0-beta.4",
"react-router-dom": "4.0.0-beta.4",

don't forget to execute yarn or npm install again to refetch proper lib in node_modules

@diondirza
Copy link
Contributor

@ctrlplusb I have updated my PR to solve this issue.

@carsonxyz
Copy link

@diondirza When I tested earlier versions, I thought the issue still existed in beta 4. Did you not find that to be the case?

@diondirza
Copy link
Contributor

diondirza commented Feb 13, 2017

@carsonperrotti nope, I have used beta 4 before and error exist in beta 5. Since new react router using new react-router-dom package name it has dependence with original package react-router if you look at their package.json it has ^ mark. So when you request beta 4 react-router-dom it will accept latest beta react-router as dependence. Therefore error will also exist if you just request exact version of react-router-dom beta 4 instead by telling explicitly what version of react-router the error will gone for good. You could try to fresh clone my fork with update-router-beta branch to prove it. Or you could do it in your local, but don't forget to delete node_modules folder and refetch again.

@diondirza
Copy link
Contributor

@ctrlplusb @carsonperrotti looks like react-router already release beta-6, looks promising right now. I'm still reviewing though, hopefully won't find another bug in it. My PR also updated as well.

@ctrlplusb
Copy link
Owner Author

I have this running on v13. Thank you so much @diondirza for your helpful PR! I will credit you with this. :)

We just need to figure out how to return a 404 status code when no Route is matched.

@diondirza
Copy link
Contributor

@ctrlplusb you are welcome, ah I missed that part I thought it wasn't necessary. Anyway I found how to solve that problem and I have send you a PR for it.

@ctrlplusb
Copy link
Owner Author

Done!

Thanks goes to @diondirza for completing this for us. 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants