TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

React Router 6

49 pointsby wr1472over 3 years ago

8 comments

sattoshiover 3 years ago
Usually new versions excite me, but with React Router I can only wonder: how much of a re-write will I need to do?
评论 #29103734 未加载
评论 #29102785 未加载
TranquilMarmotover 3 years ago
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:&#x2F;&#x2F;react-location.tanstack.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;react-location.tanstack.com&#x2F;</a><p>I&#x27;ve used Reach Router in the past and it&#x27;s also pretty nice, but I didn&#x27;t see a reason to use it over React Router... <a href="https:&#x2F;&#x2F;reach.tech&#x2F;router&#x2F;" rel="nofollow">https:&#x2F;&#x2F;reach.tech&#x2F;router&#x2F;</a>
评论 #29108494 未加载
评论 #29105184 未加载
yurishimoover 3 years ago
I think we&#x27;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&#x27;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&#x27;m glad they still exist for teams that want&#x2F;need to own the entire application stack, but there are benefits from the community standardizing too.<p>At my job (dev consulting agency), we&#x27;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&#x27;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!
评论 #29102367 未加载
评论 #29103525 未加载
评论 #29104625 未加载
vbgover 3 years ago
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.
评论 #29105378 未加载
jimrandomhover 3 years ago
I really don&#x27;t think react-router provides enough functionality to justify the amount of churn it&#x27;s generating. URL routing is not complicated and not hard. After getting dragged through a v3-&gt;v4 upgrade by a library we use, I put in a lint rule forcing all usages of it to go through a wrapper.
throwaway4goodover 3 years ago
I am I the only who finds this library a wee bit overengineered?
评论 #29104153 未加载
bern4444over 3 years ago
The authors of React Router are developing a framework for React called remix[0]. It&#x27;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
评论 #29107332 未加载
machiawelicznyover 3 years ago
Is routing so hard you have to revamp it 6 times?