logoalt Hacker News

carshodevtoday at 4:23 AM7 repliesview on HN

This title is very misleading, it should be "Why React is not compatible with long-term performance goals"

And I do agree generally. React uses an outdated rendering method that has now been surpassed by many better frameworks. Svelte/Sveltekit, Vue, and Qwik are the best examples.

People relying on bloated React packages is obviously not great but that is nothing to do with javascript itself.

The JS engines are all relatively fast now. And the document model of the current web provides major accessibility to both humans and search tools like SEO and GEO. JS is not my favorite language. I would rather the web was based on a statically typed language that had better error handling practices like Go. But this will most likely not happen any time soon as it would require every level of the ecosystem to adapt. Browsers, Frameworks, Developers etc.

Google would have to take the lead and implement this in chrome then enough developers would have to build sites using it and force safari and firefox to comply. It just isn't feasible.

If you want faster webapps just switch to sveltekit or vue or qwik. But often the ones choosing the framework for the project have not written much code in years, they know react is as safe option and used by everyone else so they follow along, if it gets slow its a "bug" causing it as they built apps that were "good enough" before using it.


Replies

socalgal2today at 6:02 AM

> Google would have to take the lead and implement this in chrome then enough developers would have to build sites using it and force safari and firefox to comply. It just isn't feasible.

They already tried. It was called Dart and for a while there was an experimental flag to enable it directly in Chrome. It was cancelled and Dart was relegated to transpiling to JS/WASM.

show 1 reply
hinkleytoday at 4:33 AM

The reason I'm a backend dev at the moment is that I looked at the React model and decided I didn't want anything to do with this insanity.

I've been appalled by how long and how broadly the mass hysteria lasted.

show 3 replies
cyberaxtoday at 9:42 AM

> React uses an outdated rendering method that has now been surpassed by many better frameworks. Svelte/Sveltekit, Vue, and Qwik are the best examples.

I strongly disagree with this. Svelte/Solid/Vue all become a twisted mess eventually. And by "eventually" I mean "very very soon".

The idea to use proxies and automatic dependency discovery looks good from the outside, but it easily leads to models that have random hidden interdependencies.

React's rendering model is simplistic ("just render everything and then diff the nodes"), but it's comprehensible and magic-less. Everything is explicit, with only contexts/providers providing any "spooky action at a distance".

And the recent React versions with Suspense neatly add the missing parts for async query/effects integration.

> If you want faster webapps just switch to sveltekit or vue or qwik.

If you want even worse webapps then switch to Vue and forgo being able to ever maintain them.

kumarvvrtoday at 4:35 AM

Do you consider Angular to have a better rendering system? Or is it similar to React?

Asking because I use Angular and want to learn other frameworks in case Angular is just as bad for long term.

show 3 replies
fud101today at 10:42 AM

I'm tired of HN complaining about react for dumb reasons. To be clear, performance and bundle size matters for some things - if that's your complaint, whatever, i have no issue. My issue is there are whole host of use cases for which React is perfect, it has a functional declarative style which favours human understanding and correctness. This is a good thing. This is what the core of modern React gives you with functional components and hooks. You can do a lot with the core these days. Svelte and Vue are inferior for all the reasons React is functional and those other choices are imperative. I could go on but stop trying to make Svelte a thing, no one is buying.

pjmlptoday at 8:27 AM

I keep enjoying SSR with Java and .NET frameworks as much as possible since the 2000's, no need for Go alone.

React is alright, when packaged as part of Next.js, which basically looks like React, while in practice it is SSR with JavaScript.

slopinthebagtoday at 10:21 AM

React's model is fine, it's just the wrong language. React implemented in Rust for example can be much faster, although you pay the cost differently for wasm <-> js communication.