Then we’ll see what drawbacks it has and how those are eliminated with the new initialization syntax used in the 3rd version of the Vue framework.
Let’s start with the current way of doing initialization in Vue 2.
Usually, in the src/main.js file, we’re bootstrapping the app by calling a new Vue as a constructor for creating an application instance. This application instance will be serving all the logic throughout the lifetime of our SPA. That all works well, and for about 3 years, we’ve been using this syntax to bootstrap our Vue apps.
Let’s have a look at the new syntax first and then take a look at the benefits of using it. In Vue 3, we have a dedicated createApp function to do just that. The createApp function takes a root component (App.vue) as an argument and returns a Vue app instance.