Introduction
In this blog I will be looking into features that have been added or changed when Vue2 updated to Vue3.
Smaller and faster
Vue3 utilizes an optimization feature known as tree shaking. This means that Vue features that are unused by the project are removed when the project is compiled. This makes projects smaller and therefore faster. Another feature that Vue3 implements is a compiler-informed DOM. This results in Vue3 projects being 41% lighter, 55% faster, having 133% faster updates and using 54% less memory than projects written in Vue2. Check out the link below for the full Vue2 vs Vue3 comparison.
Changes in initialization
- In Vue3, a dedicated “createApp()” function is used to create an app instead of using the “new Vue” instance