3 ms·
React actually makes sense to me here. Op would have to manually update the dom constantly using vanilla JS. React allows them to worry about the programming si
by schwartzworld 6y ago
React actually makes sense to me here. Op would have to manually update the dom constantly using vanilla JS. React allows them to worry about the programming side but not have to worry about how they are going to propogate those changes to the view layer.
- tshaddox 6y agoYeah. It allows the programmer to code using a similar mental model to coding with the canvas tag, where one would probably just draw the entire frame from scratch every frame. Granted, with the speed of modern browsers and the relative simplicity of this rendering, one could probably literally wipe the DOM layer and rewrite it every frame without having any performance issues. But if the rendering became more complicated it’s conceivable that React’s virtual DOM stuff could noticeably improvement performance.