Problem Statement
What is a Vue instance and how do you create one?
Explanation
A Vue instance is the root of a Vue application. In Vue 2 you create it with new Vue({...}); in Vue 3 you create an app via createApp(App).mount('#app'). The instance controls reactivity, template rendering, lifecycle hooks, and component registration.
Code Solution
SolutionRead Only
// Vue 3
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')
// Vue 2
new Vue({ el: '#app', render: h => h(App) })Practice Sets
This question appears in the following practice sets: