Why Virtual DOM is slower
Hajime Yamasaki Vukelic
561

Excellent post… I totally agreed with everything that you said, I have concern regarding performance and virtual dom on React, which is the fact that everything is considered a dom tree.

I don’t use React, but a tiny library instead that helps me to create components and I use it along with a fantastic tool that makes dom diffing. With that tiny library I can set a <header> as a root element for that component so I can work with dom properties, event delegation, etc, and if I have a navigation inside that header, that needs dom updates, I can set virtual dom only on that <nav> node, so the dom diffing works on a tiny place of the entire <header> holder.

I think this is one case which React will be always slower, because I believe that with React you will be forced to abstract the entire <header> as a react component and virtual dom will be diffing the entire header tree on every state changed. There are many cases where changing state shouldn’t update or do any diffing…or at least shouldn’t be diffing the whole html tree…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.