Re:When does React re-render? Explaining rerenders and how t...
by Vinnl on Wednesday April 29, 2020 @06:11AM
(#23017448)
Exactly. The virtual DOM is wonderful because it allows you to model your components as (roughly) a function that transforms some state into a description of the view, without having to keep track of how consecutive changes impact the result. High performance is not the goal, though acceptable performance in the general case is a requirement.
[ Parent
| on HN ]
Re:When does React re-render? Explaining rerenders and how t...
by runawaybottle on Wednesday April 29, 2020 @11:45AM
(#23020577)
But to say rendering performance of the vdom with it’s ability to sync dom updates into one one reflow/repaint was not one of the selling points of React (one of the first notable vdom proponents) is neglecting history.
When you also couple with the fact that at the time Angular 1 was doing things like dirty checking, render performance with the vdom and the ability to sync render updates was definitely a selling point for me.
The apparent motivation behind React seems to have morphed a bit.
Re:When does React re-render? Explaining rerenders and how t...
by Vinnl on Thursday April 30, 2020 @05:16AM
(#23028956)
That is certainly true; compared to Angular 1's shenanigans, it was far harder to accidentally make React slow, so of course word quickly got around that it was faster than Angular.js (something interpreted as just "fast"). However, I'm not sure if I'd call that the motivation behind it, or even conscious marketing from React's side, rather than just an artefacts of its times.
Re:When does React re-render? Explaining rerenders and how t...
by wtetzner on Wednesday April 29, 2020 @01:10PM
(#23021572)
I feel like the marketing behind React's speed was similar to that of Clojure's. Neither one is particularly fast, though they tend to be fast enough. But I think they included good performance in their marketing to avoid arguments against using them "because they're slow".