Re:React 19
by qt31415926 on Thursday December 05, 2024 @04:34PM
(#42333025)
> React doesn't make you a better developer, it makes you a better React developer.
React's pure component functional style translates really well to nearly every other type of software development.
Practically every frontend framework uses components. The problem with React is that so many of its abstractions are leaky and forces a lot of accidental complexity on the developer.
Re:React 19
by dansiemens on Thursday December 05, 2024 @07:12PM
(#42334398)
Which abstractions are leaky? State is complex. There’s not really a way to get around that.
Dependency arrays are leaky.
Re:React 19
by math_dandy on Thursday December 05, 2024 @08:34PM
(#42335109)
How do they leak? Are they even an abstraction?
One example where it's leaky is when you want to memoize something, and now you need to memoize all its dependencies, recursively, and you end up with a 30 file PR.
I say this as a big fan of React, and I'm hoping the compiler turns out a success.
Well, they're part of the effects abstraction. And they are leaking because you have to manually track them. You are already using the dependency variables inside the hook function. And now you need to duplicate them into an array and keep the array updated as your effect hook changes. This is leaky.
There are better deaigned frameworks than React. Solid for example, the api surface area is smaller, there are less things to learn and less chance for bugs.
Re:React 19
by exceptione on Friday December 06, 2024 @03:59AM
(#42337809)
If I look at an article like this, I have the impression that Solid is in the early process of discovering their own gotchas:
https://vladislav-lipatov.medium.com/solidjs-pain-points-and...
It doesn't necessarily mean that React does it right. When building React apps, developers spend too much time on designing architecture for many things that should have been taken care of by the tools they are using. The more I am in web development, be it backend or frontend, the more I'm disappointed that declarative programming is still not a thing. One too many hours wasted on reducing boilerplate, replacing big boilerplate with smaller boilerplate, optimizing boilerplate and writing that boilerplate. While still being far from perfect, other frameworks like Vue and Svelte do great job at making the developer write less boilerplate and more business logic.
Re:React 19
by hirako2000 on Friday December 06, 2024 @10:53AM
(#42340874)
I agree with that, that's not so specific to react. So I kept it to narrating the main problem I and others have with react, which is that feeling that I keep learning the framework for a variety of reasons that I believe are frustrating developers, those who want to be more than react developers.
The non declarative aspect is a problem though, with v19 it now means unbelievably large PRs and time spent to refactor will take place for migrators. Declarative would at least reduce reduce that pain.
It's nowhere close to pure, in the FP sense. Everything in React is an act around side effects of rendering.
So it's gotta be something else that makes it so popular.
Re:React 19
by math_dandy on Thursday December 05, 2024 @08:57PM
(#42335326)
Hooks do a nice job of encapsulating the impurity. Not the only way to do it, but it’s pretty slick.
React keeps changing its abstractions, idioms and best-practices every 2 years. The bootcamps and consultancies LOVE it - it keeps the churn going and the $$ coming in.
> React doesn't make you a better developer, it makes you a better React developer.
React's goal isn't to make you a better developer though. It's goal is to make it easier to build non trivial, stateful applications
which you can also do easily without react and 16Gb node_modules folder :)
Re:React 19
by hirako2000 on Saturday December 07, 2024 @04:42AM
(#42348510)
Developers' goal is to become better developers.
Disproportionate amount of energy I would rather spend learning JavaScript, something that would last.
Using React since 2013. Each release is an excitement, until I realise some chunk of concepts which altogether took months to fully grasp, are gone. Some even needed to be unlearned.
A lot of abstractions.
React doesn't make you a better developer, it makes you a better React developer.
I don't feel that with Vue. I don't feel that with most libraries I use.