News for hackers. Stuff that matters.
Re:React I love you, but you're bringing me down by pier25 on Tuesday September 20, 2022 @12:30PM (#32914099)
I totally agree. I actually stopped using React around the time hooks were announced. In retrospect it's still not clear if hooks were even a good idea.

Changing the core methodology of a project used by millions of developers at the time was extremely irresponsible. They basically made obsolete all React educational resources overnight. I'm sure people making money by producing React educational content were very happy about that though.

Re:React I love you, but you're bringing me down by cdelsolar on Tuesday September 20, 2022 @12:49PM (#32914419)
I keep seeing this sentiment here but as someone who’s used both the old paradigms and hooks - hooks are much better and simpler overall.
Re:React I love you, but you're bringing me down by uptown on Tuesday September 20, 2022 @12:56PM (#32914543)
Your argument is very compelling. /s
Re:React I love you, but you're bringing me down by WHATDOESIT on Tuesday September 20, 2022 @01:19PM (#32914855)
There was no way to make async rendering possible with classes. It was necessary and they spent a lot of time trying different approaches that'd continue the old paradigm, but it couldn't be done.
Re:React I love you, but you're bringing me down by pier25 on Tuesday September 20, 2022 @02:27PM (#32915880)
Maybe, but would you need async rendering if React wasn't so slow?
Re:React I love you, but you're bringing me down by WHATDOESIT on Tuesday September 20, 2022 @03:46PM (#32916827)
As opposed to what? Vue is slower and Angular too. Perhaps Svelte might be faster but the programming paradigm is a little weird. Writing pure JS is bullshit - I tried it few months ago and even a very simple app - for public transport schedules - got very unmanageable very quickly.

I'm currently working on a project with hundreds of reactive components shown at any given time (very extensive financial analytics/modeling collected from over 500 data sources and real-time updated). Async rendering is a godsend. Perhaps React isn't for you if you don't see the need.

Re:React I love you, but you're bringing me down by pier25 on Tuesday September 20, 2022 @04:02PM (#32917014)
There are literally dozens of libs/frameworks faster than React.

https://krausest.github.io/js-framework-benchmark/current.ht...

Re:React I love you, but you're bringing me down by WHATDOESIT on Tuesday September 20, 2022 @04:07PM (#32917096)
Lol, you really think someone is going to stray off the well-supported path for apps like these for 1-10% gain? This app shows a loading indicator quite a lot. Speed is important but nobody cares about raw speed this much. What we care about is a well-maintained library with significant ecosystem that's still going to be there in 2030 and it's super-easy to find devs and/or get help. The libs there are beta quality at best - maybe in few years.
Re:React I love you, but you're bringing me down by pier25 on Tuesday September 20, 2022 @05:15PM (#32917882)
"nobody cares about speed but give me async rendering because React is too slow"
Re:React I love you, but you're bringing me down by WHATDOESIT on Wednesday September 21, 2022 @03:17AM (#32921737)
The point is I'm not going to compare against small libs with no ecosystem, slow maintenance, small community and low amount of developers ready to use it - these new libs sound nice but it's beta software, not something to be used in production for apps like I work on. Speed is important but not this important.

What remains is React, Angular and Vue - and out of these React wins by a huge margin, also thanks to async rendering.

I'm looking forward having another look at the remaining libs in a few years.

Re:React I love you, but you're bringing me down by erikpukinskis on Tuesday September 20, 2022 @02:07PM (#32915577)
Just for the opposite perspective, I started using React when hooks came out and I love them. I can write the classes, I often have to for job interviews, but I think they’re a messy abstraction.

Hooks just match the way the React runtime works. Classes are just way easier to do weird bad stuff with. I’m not sure I would ever choose React if it was still class based. I’d use Ember probably which gives you more with the class-oriented API. Without the simplified control flow of hooks, I don’t see what React even offers over Ember or Vue.