Ryan Carniato
1 min readDec 5, 2019

--

There are issues with the Virtual DOM but this article overstates them and does not balance tradeoffs of the other approaches. First despite the Virtual DOM overhead, reactive libraries have an overhead on creation. Precompilation hides it since it optimizes short paths for DOM creation and traversal but it exists. In pure performance a VDOM library like InfernoJS is significantly faster pretty much across the board compared to every library listed here. Size is fine too. Yes Svelte is the smallest but no one is having size issues with Preact. Treating React as the only VDOM library is like treating Angular as the only non-VDOM. Popular library with legacy will take time.

On the other hand no one is talking about the overhead of Components in these other libraries. They benchmark well in no Component benchmarks, but in real life we modularize. React might not be the poster child on Performance, but it smokes every library here on Component scaling.

Any way I am firmly in the Reactive, not Virtual DOM camp. But I dislike the picture this article is painting, especially suggesting Web Components address these flaws in React and therefore Virtual DOM in general. Reactive libraries have many advantages and great potential but don't group together all pre-compiled approaches.

--

--

Ryan Carniato
Ryan Carniato

Written by Ryan Carniato

FrontEnd JS Performance Enthusiast and Long Time Super Fan of Fine Grained Reactive Programming. Member of Marko Core Team. Author of SolidJS UI Library.

Responses (1)