Hacker News new | past | comments | ask | show | jobs | submit login

A well put together article.

I still remember the day when angularjs was a new thing(around 2015 perhaps) and as a newcomer I was sucked into it. Just loved the thing. A year later, there were news about Observable JavaScript objects. So objects could send a notification about themselves having been changed. And when do so, do DOM changes could be done accordingly, without having to implement a render algorithm and having to compare shadow nodes with new render results to see what changed every time any data change occurs. I don't think we are past that with React, and as the author mentioned there should be absolutely no reason for a developer to worry about rendering performance (the amount you have to use react, with for example useMemo, useCallback) and is something to be looked after and questioned.

Another argument of mine[0] would be the definitions that have been introduced by react. Component, state, hooks. It seems like we have forgotten about what they are actually called, and its function is in the context of programming (functions, variables, events, etc.). And so people become solely a React developer and can't really see a way out. (from the article: "And maybe—just maybe— your current satisfaction comes, at least a little bit, from simply not knowing what you’re missing.")

[0] - https://medium.com/@ngergo/describing-how-react-works-in-com...




> there should be absolutely no reason for a developer to worry about rendering performance

i have a csv with one million rows. should i load the entire thing into memory and render 1m * column_count dom elements?

> Another argument of mine[0] would be the definitions that have been introduced by react. Component, state, hooks. It seems like we have forgotten about what they are actually called, and its function is in the context of programming (functions, variables, events, etc.).

a Component is a Component because it represents a node in the React tree. not all functions are Components.

state is state because it's more than a variable - updating it triggers re-rendering. a normal JS variable does not come with this reactivity.

hooks are not events. they are wrappers for reusable logic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: