1.

What is the mounted event in Vue.js?

Answer»
  • mounted EVENT: Among the list of LIFE cycle hooks.  It is called after the DOM has been mounted or rendered. DOM elements are accessed, and DOM MANIPULATION can be performed, for example, get the innerHTML 

console.log(element.innerHTML) 
  • When a Vue instance is created in Vue.js, there are various steps to be followed. Initially, they are created then mounted, and finally destroyed at the END. WITHIN this process, life cycle hooks are run. Life cycle hooks allow us to add code of their interest at specific stages. 
  • Life cycle hooks mounted events are the most used ones. Developers have full access to reactive data, templates, and rendered DOM. 


Discussion

No Comment Found

Related InterviewSolutions