Instance Properties and Methods

Learn about important instance properties and methods in Vue.

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 that have a ref attribute.

Get hands-on with 1400+ tech skills courses.