Module 5 - Vue behind the scenes Flashcards
What are the creation lifecycle events Vue has?
The Vue lifecycle events are : beforeCreate created beforeMount Mounted
What are the event changes life cycle hooks Vue has?
the event changes life cycle hooks Vue has:
beforeUpdate
updated
What does unmount do?
unmounting a vue app first goes through the beforeUnmount lifecycle hook and then the unmounted lifecycle hook
Where do you add the Vue lifecycle hooks ?
The lifecycle methods are added to the config object provided in the createApp method.
How does Vue know when to do stuff?
Vue takes all the fields that are mentioned in the Data config section and puts them in a global object together with the methods in methods section. It monitors , using proxies, all the data fields and reacts to changes to those fields (like recomputing computed fields or calling functions in watch.
what is a Proxy?
The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.
Can more than one app be used
Yes, you can define one app per one template
What is a template
A template is the part of the HTML that is controlled by
Vue. You mount the app on the html element you want to control. You can also define the template inside the app in a template section