Blog Soft Gorillas

9 May 2023

29. Vue.js functions

Numerous built-in functions in Vue.js are available for modifying and interacting with the Vue.js application. The following are some typical Vue.js built-in features:

∙$mount(): mounts a Vue.js application to a specific element on the page.

∙$el: returns the root DOM element of the Vue.js application.

∙$data: returns the data object of the Vue.js application.

∙$options: returns the options object used to create the Vue.js application.

∙$watch(): allows you to watch a specific property or expression for changes and execute a

callback function when a change is detected.

∙$set(): allows you to set a new value for a reactive property, ensuring that the view is

updated accordingly.

∙$delete(): allows you to delete a reactive property, ensuring that the view is updated

accordingly.

∙$on(): allows you to register an event listener for a specific event.

∙$once(): allows you to register an event listener for a specific event, but only triggers once.

∙$off(): allows you to unregister an event listener for a specific event.

∙$emit(): allows you to emit an event to all registered listeners.

∙$nextTick(): allows you to schedule a function to be called after the next render update is

complete.

These are just a few of the numerous built-in functions that Vue.js offers; there are many more. Since each of these operations is an instance property, every Vue instance can use them.

Subscribe

* indicates required

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.