The author of react-query (one of my favorite libraries) also just released the beta of yet another router called React Location: <a href="https://react-location.tanstack.com/" rel="nofollow">https://react-location.tanstack.com/</a><p>I've used Reach Router in the past and it's also pretty nice, but I didn't see a reason to use it over React Router... <a href="https://reach.tech/router/" rel="nofollow">https://reach.tech/router/</a>
I think we're at an interesting time for React routing. It seems like a ton of shops are standardizing on Next.js as a base for new projects, especially if you're building a pretty vanilla web app.<p>Since Next takes care of routing for you, the need for projects like this operating at huge scales is diminishing. I'm glad they still exist for teams that want/need to own the entire application stack, but there are benefits from the community standardizing too.<p>At my job (dev consulting agency), we're about to embark on rebuilding an in-house framework onto Next.js to take advantage of the larger community tooling and to simplify onboarding of new hires.<p>React Router has so far made it through 6 iterations, it wouldn't surprise me if v7 was some sort of drop-in plugin replacement within Next. It could open up some areas for more complex navigation requirements without some of the hacky workarounds you need in Next currently.<p>Interesting times indeed!
I still feel resentful about how earlier versions of react router had massive breaking changes effectively completely changing it, provided no documentation and no help at all even understanding the new thing let alone explaining how to upgrade.<p>To be fair I believe I once read they now don’t do that but it was truly scarring to naively update to the newest version thinking my app would need a few tweaks to get going again, when in fact big chunks needed rewriting, with zero help from the developers.
I really don't think react-router provides enough functionality to justify the amount of churn it's generating. URL routing is not complicated and not hard. After getting dragged through a v3->v4 upgrade by a library we use, I put in a lint rule forcing all usages of it to go through a wrapper.
The authors of React Router are developing a framework for React called remix[0]. It's not available yet, but it will be soon and it will be open source.<p>Remix will certainly use react-router and I expect it to be similar to NextJS but better. My expectation is Remix will blow NextJS out of the water and become the defacto starting point like how NextJS is today.<p>[0] remix.run