(no title)
bloomca | 4 months ago
I think a logical continuation of this model is something like Solid.js, where there is no concept of re-rendering, just atomic DOM updates when observables change their values, but somehow this approach didn't get critical traction.
embedding-shape|4 months ago
With that said, the "mental model" of React, or maybe the focus, is "pure" where it matters, namely that you have data, pass it through a function, and you get a view/UI, and if you pass the same data, you get the same UI, regardless of what happened before.
When it appeared, was very different from us web developers were used to, where sometimes the DOM even was our data store, and mutation was the name of the game.
So when people say "React is pure", I don't think they're talking about internally, or "100% pure", just that the mental model you need to adjust to is that the UI gets created from (mostly) pure functions.
Of course, this all breaks down once the frontend application actually runs in a browser, but that doesn't mean it isn't valuable for the developer as things gets a lot simpler.
Not disagreeing with you in the end I guess, just clarifying for those who might not be familiar with React, and get confused when some people say it's pure, while others don't. Both are right :)
valenterry|4 months ago
It's not an utopia. It will eventually happen and it will replace how react.js currently works. effect.website will probably be the foundation.
mpweiher|4 months ago
Yeah, my pull request to make the documentation honest about this has languished.
https://github.com/reactjs/react-basic/pull/12
dmix|4 months ago
I believe Vue is going in that direction https://www.vuemastery.com/blog/the-future-of-vue-vapor-mode...
greener_grass|4 months ago
kybernetikos|4 months ago
embedding-shape|4 months ago