4 ms·
I believe the term is "fine grained reactivity". Basically, components do not rerender when data updates, only the specific part of the DOM dependent on that da
by internetter 4y ago
I believe the term is "fine grained reactivity". Basically, components do not rerender when data updates, only the specific part of the DOM dependent on that data.
This alleviates all the footguns that come with rerenders (including the infamous infinite loop) and often results in cleaner code.
I'm partial to solid[0] (there are lots of comparison articles, but I think [1] and [2] show it the best). I believe svelte is similar and vue is experimenting with this as well
[0]: https://www.solidjs.com/ https://www.solidjs.com/
[1]: https://news.ycombinator.com/item?id=30508524 https://news.ycombinator.com/item?id=30508524
[2]: https://news.ycombinator.com/item?id=35061672 https://news.ycombinator.com/item?id=35061672
- deleted 4y ago[deleted]
- jakelazaroff 4y agoThat isn’t always true. Reactivity can make updates faster, but adds more overhead to creating DOM nodes because you need to set up the subscriptions that are used to eventually update them. To steal a phrase originally about VDOM: “reactivity is pure overhead”. Nothing comes for free!
- internetter 4y agoMaybe in theory, but solid still outperforms react in creations by a considerable amount, and I think most applications will find they are doing a lot more rerenders than insertions anyway