5 ms·
> 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 i
by diggan 2y ago
> 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.
- ramesh31 2y ago>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.
- diggan 2y ago> 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.
- jakubmazanec 2y ago> 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.
- kod 2y agoto be fair, "thunk" is decades old https://en.wikipedia.org/wiki/Thunk https://en.wikipedia.org/wiki/Thunk
- martinsnow 2y agoNo. These terms are not uniquely new.
- tmpz22 2y agoReact-router can still cause weird build issues to this day, particularly with LLM generated code that cannot understand version compatibilities.
- nonethewiser 2y agoAn emergent benefit of stability
- amrocha 2y agoIf you try to build incompatible code and it doesn’t work, that’s not a bug
- tmpz22 2y agoI'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.
- amrocha 2y agoI’d argue you should read the docs and write code that works and you wouldn’t have any problems
- debacle 2y agoI 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.
- nonethewiser 2y ago> 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.
- debacle 2y agoThe 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.
- lelandfe 2y agoI 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 https://reactrouter.com/start/framework/installation
- Noumenon72 2y agoI 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.