Search⌘ K
AI Features

Instance Properties and Methods

Explore Vue's instance properties and methods to efficiently manage component data, events, and rendering. Learn how to access $data, $props, $refs, and control updates with $nextTick and $watch, gaining deeper control over component interactions and lifecycle.

Vue has numerous features that come out of the box. Many of these are not important for small apps, but more complex ones might benefit from what Vue’s instance properties and methods offer. The following instance properties are tightly coupled to some core features we might use even in smaller apps.

  • $emit: We use this to emit events to components higher up.
  • $slots: We use this property to pass data to any slot.
  • $el: This is the element on which we mounted the Vue component/app.
  • $forceUpdate: If we need an update to be triggered programmatically, we can use this method.
  • $refs: This gives us access to all elements in the template
...