logoalt Hacker News

littlecranky67today at 7:46 AM2 repliesview on HN

React has always been tracking what component relies on what state, independent of the compiler. That is one of the reason the rule-of-hook has to exist - it tracks if a component calls useState() and thus knows the according setState function that manipulates that particular state.

Idk why people claim React is bloat, especially since you can switch to Preact (4kb) most of the time without changes if filesize is an issue for you.


Replies

epolanskitoday at 10:30 AM

> Idk why people claim React is bloat

Because it's very hard to control it's rendering model. And the fact that multi billion dollar startups and multi trillion dollar companies hiring ivy league charlatans still have bloated low-performing websites written in react (that don't even need react...) clearly states the issues aren't that trivial.

> React has always been tracking what component relies on what state, independent of the compiler.

This still needs a complete parsing and analysis of your components and expressions. Which is why there is no single very performing UI library that can avoid directives.

show 2 replies
Capricorn2481today at 9:34 AM

Because people make shitty React apps and people think React is slow because of it.

It's definitely not slow here. It's within 20% of Svelte. That's not nothing, but it's not the huge monster people claim it is

https://krausest.github.io/js-framework-benchmark/2025/table...

show 1 reply