DEV Community

Discussion on: DOMs Decoded: DOM, Shadow DOM & Virtual DOM

Collapse
 
dannyengelman profile image
Danny Engelman • Edited

Totally incorrect explanation of what Virtual DOM is.

Virtual DOM still has to update the DOM. So for an exact same DOM update React (or any framework) is slower than native JavaScript updating the DOM.

Facebook made React use Virtual DOM because it had stupid developers that kept updating the DOM parts that never changed.
Virtual DOM is all about changing only the parts that need changing.

So if you are a smart developer (any developer smart enough to not use React) you can update only the DOM parts that need to change yourself... and faster than any Framework can.

Virtual DOM shields stupid developers from shooting themselves in the foot because they don't master native code.

Collapse
 
barucalmaguer profile image
Baruc

Lol so much ignorance and hate.

React selling point is declarativeness and allowing to structure your code as Components.

It just happens to use a virtual DOM, but other declarative libraries like Svelte don't require a virtual DOM, and their selling point is the same.

If you are going to talk with that authority at least be correct in what you are saying, the post explained it right

Collapse
 
ruppysuppy profile image
Tapajyoti Bose

I think you should try re-reading the virtual dom section.