Skip to content

Instantly share code, notes, and snippets.

@blarzHernandez
Last active December 1, 2020 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blarzHernandez/4f51e1c92c416c03a59278fd6f01d336 to your computer and use it in GitHub Desktop.
Save blarzHernandez/4f51e1c92c416c03a59278fd6f01d336 to your computer and use it in GitHub Desktop.
Learning VueJS
export default LifeCyclesHooks {
// This hook triggers before the Vue instance is created, we cant acccess to data
beforeCreate(){
console.log("Before create")
}
//Called syncronously after the Vue instance is created.
created(){
console.log("Hook created")
}
//Called rightt before the mounting begins: the render function is about to be called for the first time
beforeMount(){
console.log("Before mount hook")
}
//Called after the Vue instance has been mounted, where element, passed to Vue.createApp({}).mount()
mounted(){
console.log("Mounted")
}
}
// Create a Vue instance
var vm = new Vue({
el:"#myDiv",
data:{
company:{
name:"Mullin Stack",
status:"Running"
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment