logoalt Hacker News

eastbound04/01/20253 repliesview on HN

> React’s baseline isn’t a monster.

Yes it is. It’s not size, it’s logic: Every time the component rerenders, the root loop is executed. Why? The root loop reassigns every useEffect, reruns every useState, every other hook (and useSearchParams is executed n times for n components that need it in the hierarchy) when only the HTML needs rerender.

(Yes the programmer can optimize/memoize, and yes “a hook’s execution time is very short” (but multiplied by every cell in the table, when needed)). Must be the fault of the programmer if the framework has a super-intensive concept at the root.)


Replies

code_biologist04/01/2025

I'm old enough to remember when this simplified model was why people thought React was better than alternatives.

show 1 reply
lucsky04/02/2025

> It’s not size

That's what TFA is complaining about: size. But nice pivot, hope your head isn't spinning too much.

fijiaarone04/02/2025

Yeah, react developers don’t even realize that there is execution time as well as download time for an app.