Live data from Hacker News

If not React, then what?

infrequently.org

261–270 of 756 posts

Re: If not React, then what?

#261
post #12

The only part of this whole thing I agree with is that you shouldn’t start a new project in React. Switch to SolidJS, and gain all the benefits (aside from the huge ecosystem) but with a speed to match plain HTML/JS.

> aside from the huge ecosystem

Sometimes less is more

Re: If not React, then what?

#262

I think almost any technology gets to the "this is stupid" point. Not it "was" stupid, but it is. We understand something so well, we know that despite being useful it is fundamentally flawed. This is not usually verbal knowing, but initially more from an intuition and understanding a pattern. I have used react, it was certainly a better choice than the alternatives. I like it. But it is now "stupid", at least for me…

These are cool demos, I agree, and they definitely show a glimpse of what the future of the web could look like. Right now though, pretty much all of them take ages to load, then spin my fans up as they run at low fps. And this is on a dev laptop, can't imagine what they're like on mobile or an older device.

My iPhone 12 just crash the page while loading

Re: If not React, then what?

#263

I'll continue using vanilla React, for the same reason I use Java: it's reached the coveted "boring technology" status where it's mature, stable, fast enough, and has a huge community, resources, and ecosystem. I won't let go of that easily. However, this is a pretty epic rant nonetheless.

You're going to love Vue. Took me about half an hour to switch and be productive and never looked back. I've switched multiple teams/devs to it as well. If not just for the devtools experience. I switched right before all the messy React stuff started getting released.

To me, the best part of react/jsx is that if you know HTML, and you know JavaScript, you can easily write JSX. I'm primarily a backend engineer, but I grokked JSX pretty much instantly. Anything in scope in JS is available in the JSX.

Vue templates are, well, yet another funny little template language. The hello world example already seems way too magical. Just let me use the language I already know.

Re: If not React, then what?

#264

Earlier quoted context omitted.

Maybe Angular is still used a lot, in legacy projects. I just mean for starting a new project, imo most people will choose React or Vue in 2024, right? I never used Angular myself, but have used both React and Vue a lot.

I don't have strong insights about current agnular popularity. I think at least teams/companies which built strong expertise in angular will continue using it for new projects unless there is some big reason not to. SO trends show that angular is more popular, while vue is loosing share (not necessary absolute number): https://trends.stackoverflow.co/?tags=angular,vue.js,reactjs

Thanks for sharing that graph. It does show React as the leader, the the others in distant 2nd/3rd place.

However I think the "drop off" in the chart for React is misleading/incorrect, and likely indicates just a slowing down of the economy and/or people moving to LLMs for their searches and abandoning StackOverflow completely, as I have.

For the past year I haven't yet found a question that an LLM couldn't answer better than S.O. could, although ironically most of the LLM learning did come from S.O.

Anyway, yeah shops will stick to their legacy code forever unless something forces change, because retooling is super expensive in money and time, not to mention replacing all your developers with different ones!

Re: If not React, then what?

#265
Great, another misinformed rant about React; meanwhile React developers get stuff done without inventing yet another template language.

Also, website aren't slow because of React, they are slow because of shitty developers or insufficient budgets.

Re: If not React, then what?

#266

I'll continue using vanilla React, for the same reason I use Java: it's reached the coveted "boring technology" status where it's mature, stable, fast enough, and has a huge community, resources, and ecosystem. I won't let go of that easily. However, this is a pretty epic rant nonetheless.

Have you heard of HTML, CSS and forms? They are even more boring, more mature, more stable, often faster, have a huge community, massive resources and ecosystem. React is even built on one of these technologies!

Re: If not React, then what?

#267

Earlier quoted context omitted.

I think the author understands that just fine (I follow him on Mastodon and this is something he is very passionate about). To me his argument is that this shouldn't—and doesn't need to—be the case. The vast majority of sites out there would be just fine, and in many cases much better, as traditional server-rendered pages with a thin layer of JS on top for enhancements and for islands of interactivity. That massively…

Building a web application with a UI in a professional context without a frontend build is borderline malpractice. Even a "thin" layer of JS on top requires some degree of dependency management, and I personally have no desire to go back to the days of vanilla CSS, so you need a SASS/SCSS transpiler. Then there's a lot of handy things that frontend builds do, like normalizing SVG icon formats, automatic organization…

Nowhere in my comment did I say abandon a build step?

I’m saying—if you do not have high interactivity requirements, which I would claim is most things on the web—you will encounter a lot less overall complexity shipping mostly server-rendered pages with isolated, self contained JS bundles where you need them.

I was using multi-entrypoint build steps outputting separate per-page or per-feature CSS and JS bundles long before I ever worked on an SPA, it’s hardly a good reason to move your entire UI and routing to the client-side.

Re: If not React, then what?

#268
post #168

Reading over the authors primary reasons to not use React, they strike me as fundamentally misguided - mostly solving problems that most people don’t have. One reason it says that React is a poor choice is performance issues. But front end performance issues are almost never the most pressing issue to deal with. React performance concerns in the real world are typically measured in, at worst, hundreds of milliseconds…

I urge you to read Alex's Reckoning series.

> performance concerns in the real world are typically measured in, at worst, hundreds of milliseconds.

I think outside of the privilege bubble where a significant percentage of the world is in, these concerns are measured in the tens of seconds.

> it doesn’t create issues visible to my users

What do your users look like? What kind of devices are they on? Is it mostly mobile or desktop? Are they mostly accessing your service on cellular networks or not? Based on that, what does your INP look like? IMO you'll see the impact of React's legacy synthetic event system by looking at your INP because it's reinventing in userland what the platform already does well. This impact on INP is amplified on mobile and moreso on low-end mobile. See CRUX data visualised by desktop or mobile below:

https://infrequently.org/2022/12/performance-baseline-2023/#...

> Finally, the author doesn’t actually give a prescription as to what to use instead of React.

I think he does and that's a big part of this article. It's almost literally everything from the "OK, But What, Then?" section. The TLDR is there isn't a one-size-fits-all.

Re: If not React, then what?

#270
post #37

A fun thing about reading Alex is that you can tell he's had the same arguments over and over again for a decade now and he's frustrated with having to keep on making the same points and getting the exact same responses. Most of the people commenting on this piece won't have read this whole article (it's long, and internet attention spans are short). As a result, you'll find plenty of the comments here were exactly p…

> A fun thing about reading Alex is that you can tell he's had the same arguments over and over again for a decade now and he's frustrated with having to keep on making the same points and getting the exact same responses.

The sad part is that it's the same increasingly hostile arguments he's making while he spent the decade making sure that browsers remain bloated and tech requires Javascript to even barely function: see his entire work on web components.

> I see him as something of a Cassandra at this point, doomed to see the truth about web performance based on many years of research

He's not the only one speaking about web performance, or doing research. He's not Casaandra. At best, he's a false prophet.

His series on web performance gaps is good, though.

Post reply on HN