Search⌘ K

el: ‘#app’ and .$mount('#app')

Explore how to mount a Vue.js instance using the el property and the $mount method. Understand their syntax, how they work, and why deferred mounting with $mount can be beneficial, especially for events or async processes. This lesson clarifies fundamental Vue.js app structure concepts to enhance your SPA development skills.

There are multiple syntaxes to mount a Vue instance. They might be different in syntax but perform everything in a similar fashion. In this lesson, the two most common ways to mount the Vue instance are discussed:

  1. el: '#app' as a property in the Vue instance
  2. Calling $mount('#app') on the Vue instance
...