reach / router

https://reach.tech/router
MIT License
6.9k stars 326 forks source link

Question: Which router project to use moving forward? #493

Closed cduff closed 2 years ago

cduff commented 2 years ago

Should we continue using @reach/router or move to react-router-dom?

Back in late 2019 when I had to choose a router for a CRA project I followed the guidance announced in the React Router documentation:

If you only have a few routes you may want to pick @reach/router. The @reach/router API looks slightly more like the new API so it'll be easier to migrate in one commit. It shouldn't take more than an afternoon.

Also:

React Router will be the surviving project.

I'm still using @reach/router but have just hit npm installation issues as per https://github.com/reach/router/issues/429 which makes me think maybe this project has been abandoned and we should be moving to React Router?

Thoughts from anyone in the know?

cduff commented 2 years ago

Well here's the answer!

https://remix.run/blog/react-router-v6

We want to be very clear about this: React Router v6 is the successor to all previous versions of React Router including v3 and v4/5. It is also the successor to Reach Router. We encourage all React Router and Reach Router users to upgrade to v6 if possible.

And here's a migration guide: https://reactrouter.com/docs/en/v6/upgrading/reach