The Root Component

The root component is the starting point for rendering when a Vue application is mounted. The createApp method generates the root component and uses the options passed to configure it.

The root component is mounted to a DOM element using the mount method. The mount method will also return the root component instance.

const RootComponent = {
  /* options */
}
const app = Vue.createApp(RootComponent)
const vm = app.mount('#app')

While simple Vue applications can consist of only a root component, more complex applications will consist of multiple components. Each component will have its own component instance.

We will discuss components later on in the course.