Live data from Hacker News

React Router 6

reactrouter.com

31–40 of 49 posts

Re: React Router 6

#31
post #25
post #24

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. 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…

That's the definition of a major version change though...

Theoretically yes, but if you think of the metric of % of library-interacting lines of code an average library user needs to change to upgrade, React Router has been a huge outlier compared to other libraries in the React ecosystem. Your routing components would change completely. And the maintainers saw no problem with this.

Re: React Router 6

#32

The author of react-query (one of my favorite libraries) also just released the beta of yet another router called React Location: https://react-location.tanstack.com/ 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... https://reach.tech/router/

Vue has an official router library, but react seems to have multiple popular routing libraries. Reinventing the wheel much?

How is anyone supposed to get a job if they don't promote their own fiefdom?

Re: React Router 6

#33
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.

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.

[0] remix.run

Re: React Router 6

#34

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. 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. [0] remix.run

I was working on a project recently combining ViteJS and React Router to make a NextJS alternative. Mostly so that I have more control about where I host it and not so Lambda/Vercel optimised.

I don't really see how you could "blow NextJS out of the water" though. As a concept, NextJS nails it with the simple directory structure, api endpoints, a nice mix of server side and client side rendering. There's not much else I'd want from a web framework feature wise.

Re: React Router 6

#35

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. 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. [0] remix.run

I was working on a project recently combining ViteJS and React Router to make a NextJS alternative. Mostly so that I have more control about where I host it and not so Lambda/Vercel optimised. I don't really see how you could "blow NextJS out of the water" though. As a concept, NextJS nails it with the simple directory structure, api endpoints, a nice mix of server side and client side rendering. There's not much els…

https://github.com/conradludgate/vite-react-ssr-next here's my project if anyone is interested. It kinda sucks at the moment though so definitely don't use it, but hopefully it might inspire someone

Re: React Router 6

#36

Earlier quoted context omitted.

Write fewer tests and change quickly.

Write end-to-end tests that test behavior instead of implementation.

I think it's time to start testing tests. The first test will be metrics how often tests are changed when the things they test are changed. If it's close at all to 1 to 1 then the test fails.

Re: React Router 6

#37
post #20

Earlier quoted context omitted.

Kinda defeats the purpose of NextJS's organization - the filesystem based routing is pretty key to their server side rendering logic and the cornerstone of their sensible defaults for making performant applications out of the box, vs just having a wildcard route that runs React Router - might as well just use CRA in that case, no?

> might as well just use CRA Why would anyone use CRA when there is next? Either I write my webpack config, or I use a comercial tool with sensible default, and the flexibility to mix and match single page and SSR in the future.

There are many reasons, but what I was saying is that if you don't use the routing, then a lot of the value of NextJS disappears.

Re: React Router 6

#38

The author of react-query (one of my favorite libraries) also just released the beta of yet another router called React Location: https://react-location.tanstack.com/ 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... https://reach.tech/router/

Wow, another library (react-location) that shows TypeScript as its primary documentation language. And I see more and more jobs hiring for TypeScript developers.

I see Microsoft's 3 E's campaign strongly in action with TypeScript.

For those who care about Corporate Ethics, please review Microsoft's: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguis...

For that reason, I refuse to touch TypeScript libraries-- out of sheer anti-corporate-oligarchy ethical conviction.

Re: React Router 6

#39

The author of react-query (one of my favorite libraries) also just released the beta of yet another router called React Location: https://react-location.tanstack.com/ 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... https://reach.tech/router/

Wow, another library (react-location) that shows TypeScript as its primary documentation language. And I see more and more jobs hiring for TypeScript developers. I see Microsoft's 3 E's campaign strongly in action with TypeScript. For those who care about Corporate Ethics, please review Microsoft's: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguis... For that reason, I refuse to touch TypeScript libraries…

Well, it's open source and they aren't going to extinguish JavaScript anytime soon. So I don't see how it would apply here.

Re: React Router 6

#40
post #20

Earlier quoted context omitted.

> might as well just use CRA Why would anyone use CRA when there is next? Either I write my webpack config, or I use a comercial tool with sensible default, and the flexibility to mix and match single page and SSR in the future.

There are many reasons, but what I was saying is that if you don't use the routing, then a lot of the value of NextJS disappears.

Could you share the reasons you don't pick Next.js? Are you only finding value in the file system routing?
Post reply on HN