News for hackers. Stuff that matters.
Re:You should know this before choosing Next.js by diggan on Wednesday March 26, 2025 @10:24AM (#43482611)
> next.js when they switched from the pages router to app router

It is react-router all over again. For those who weren't around, react-router appeared early in React's life, and lots of people were using it. But, for every major version they released, they completely changed the way of doing the routes/routing, so if you wanted to use a maintained release, you'd have to constantly refactor, often without any real gains except "now we're on the latest version". I, just like parent with next.js, eventually stopped using it because it was too much.

It's kind of weird to me how programmers (especially of libraries like that) aren't more careful about introducing breaking changes, since the work needed to be done afterwards multiplies really quickly. I'd wish people just split their new stuff into new libraries instead of changing the interface of existing ones.

Re:You should know this before choosing Next.js by lelandfe on Wednesday March 26, 2025 @10:53AM (#43482925)
I love that the "new" way to use React Router just says "Most projects start with a template"... and then gives no installation instructions for adding it to an existing project beyond looking at an already configured one: https://reactrouter.com/start/framework/installation
Re:You should know this before choosing Next.js by tmpz22 on Wednesday March 26, 2025 @10:32AM (#43482681)
React-router can still cause weird build issues to this day, particularly with LLM generated code that cannot understand version compatibilities.
Re:You should know this before choosing Next.js by nonethewiser on Wednesday March 26, 2025 @10:37AM (#43482737)
An emergent benefit of stability
Re:You should know this before choosing Next.js by amrocha on Wednesday March 26, 2025 @02:21PM (#43485178)
If you try to build incompatible code and it doesn’t work, that’s not a bug
Re:You should know this before choosing Next.js by tmpz22 on Wednesday March 26, 2025 @09:51PM (#43489633)
I'd argue there are too many incompatibilities between minor and major version changes between the "core" react libraries (DOM, react-router, etc) and those teams were a bit reckless with the API surfaces and how they fit together.

At the end of the day it's free software and it's not like I've been submitting PRs to improve it. Further react-router is something you can setup at the beginning of a project and largely never touch again. Its not the end of the world, but it does cut a lot of folks who are new to React, Frontend, etc., and contributes meaningful costs to frontend development as a whole.

Re:You should know this before choosing Next.js by amrocha on Thursday March 27, 2025 @03:15AM (#43491142)
I’d argue you should read the docs and write code that works and you wouldn’t have any problems
Re:You should know this before choosing Next.js by debacle on Wednesday March 26, 2025 @10:33AM (#43482689)
I disagree with this a little bit. Yes, a lot of the react-router changes are a PITA especially since some of the breaking changes are non-obvious. But most of the changes have been syntactical, and seemingly logical.

A bigger gripe with react is that everything is so interdependent that things like react-dom and react-router might as well just be part of react - if you update one, you need to update the other anyway.

Re:You should know this before choosing Next.js by nonethewiser on Wednesday March 26, 2025 @10:35AM (#43482718)
> Yes, a lot of the react-router changes are a PITA especially since some of the breaking changes are non-obvious. But most of the changes have been syntactical, and seemingly logical.

"Syntactical" seems to reinforce his point, no? As opposed to functional.

Re:You should know this before choosing Next.js by debacle on Wednesday March 26, 2025 @10:38AM (#43482748)
The intent I think is "Lets refactor the syntax of the router so we can add more functionality without creating a boondoggle." At least from what I have seen.
Re:You should know this before choosing Next.js by ramesh31 on Wednesday March 26, 2025 @10:27AM (#43482643)
>It's kind of weird to me how programmers (especially of libraries like that) aren't more careful about introducing breaking changes, since the work needed to be done afterwards multiplies really quickly.

Programmers, generally, always aim to do that.

But the JS framework world for whatever reason has this constant obsession with reinvention. I honestly think it stems from a sort of inferiority complex that FE devs had in the the 2000s/10s which led to every single library feeling the need to invent new words to describe some CS concept that has been around for 40 years, and to massively overcomplicate things for the sake of sounding smart. So stores became "reducers", promises became "thunks", and macros became "runes", and lots of FEs got to high five themselves and add that stuff to their FAANG promotion packets while we wallowed in their mountains of meaningless abstractions in the name of "doing things The Right Way" like FB and Google.

Re:You should know this before choosing Next.js by diggan on Wednesday March 26, 2025 @10:31AM (#43482668)
> Programmers, generally, always aim to do that

Based on the amount of churn almost everywhere, I disagree with it seems like most are trying to aim to do that. I've been hit by similar issues (across multiple versions) in Python, Rust, Ruby, Go and bunch of other languages too. But then I'm comparing other ecosystems to Clojure which actually aims for interface stability, so maybe an unfair comparison.

Re:You should know this before choosing Next.js by jakubmazanec on Wednesday March 26, 2025 @11:00AM (#43482995)
> obsession with reinvention

That seems like a comment made with an outsider perspective. Various front-end libraries keep changing APIs simply because the web and related technologies keep constantly evolving.

When was the speed of change fastest and why? During 2010s, because usage of web/apps for everything exploded and browsers started to add features that designers and developer needed. If your CSS/UI library doesn't support for example CSS grid, you do what - not upgrade it and won't use modern grid at all? That's just a silly attitude.

> CS concept that has been around for 40 years, and to massively overcomplicate things for the sake of sounding smart

That maybe true, but 1) not only FE developers do that, 2) it's orthogonal to the actual reason I stated above.

Re:You should know this before choosing Next.js by kod on Wednesday March 26, 2025 @12:43PM (#43484113)
to be fair, "thunk" is decades old

https://en.wikipedia.org/wiki/Thunk

Re:You should know this before choosing Next.js by martinsnow on Wednesday March 26, 2025 @02:15PM (#43485112)
No. These terms are not uniquely new.
Re:You should know this before choosing Next.js by Noumenon72 on Wednesday March 26, 2025 @03:45PM (#43486313)
I was kind of offended by this with React Router version 6.4 and again when I saw the library/framework split with version 7, but without having time to switch I've found that the things like loaders and fetchers and useMatches and BrowserRouters are just what I should be doing, ergonomic and useful. Adjusting to them is moving my app forward.