DEV Community

Discussion on: What is Virtual Dom? And Why is it faster?

Collapse
 
rehmatfalcon profile image
Kushal Niroula

While virtual DOM reduces DOM updates, it is also pure overhead as we need to diff at every step.

This is why svelte.dev/ is very exciting. It is not a framework, but a compiler. It will generate the js that will update the DOM directly without needing any diff.

Collapse
 
elevending profile image
Happy_Dog

Like vue1.x? it means every DOM has a watcher instance, when state changed,the deps call the notify method to call all of the watchers to update the dom