Evan You On The Virtual DOM - Advanced Components - Vue Mastery
Evan You On The Virtual DOM - Advanced Components - Vue Mastery
Initial implementation
Evan credits snabbdom, a VDom library which he forked to create Vue’s VDom. Snabbdom is simple,
performant, extensible, and has a modular architecture.
The modular design helps separate concerns into modules such as style, classes, and attributes. This
makes it easy for Vue to have its own modules to handle directives and ref. It also allows for the
construction of a different patch functions with modules that target different platforms. This enables
Vue to be platform agnostic and is what enables alternate platform implementations
like Weex and Nativescript.
https://www.vuemastery.com/courses/advanced-components/evan-you-on-virtual-dom 1/3
19/4/2020 Evan You on the Virtual DOM - Advanced Components | Vue Mastery
The image above shows how the compilation phase can be further optimized for additional
performance by doing static analysis amongst other improvements. Evan compares this to GNU
Compiler Collection providing optimization levels to create a better assembly.
This way the template syntax can remain the same while the underlying implementation can be
iteratively optimized over time.
https://www.vuemastery.com/courses/advanced-components/evan-you-on-virtual-dom 2/3
19/4/2020 Evan You on the Virtual DOM - Advanced Components | Vue Mastery
The view.js of the Vue Router is a perfect example of the power of render functions.
Up next
In the next lesson we’ll have a closer look at functional components and their usage.
https://www.vuemastery.com/courses/advanced-components/evan-you-on-virtual-dom 3/3