Last active
December 1, 2020 22:19
-
-
Save blarzHernandez/4f51e1c92c416c03a59278fd6f01d336 to your computer and use it in GitHub Desktop.
Learning VueJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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