showing results for - "onload vue stackoverflow"
Jaden
09 May 2019
1 methods: {
2     getUnits: function() {...}
3 },
4 beforeMount() {
5    this.getUnits()
6 }
7
8________________________________________________________________________________
9
10beforeCreate: Called synchronously after the instance has just been initialized,
11before data observation and event/watcher setup.
12
13created: Called synchronously after the instance is created. At this stage,
14the instance has finished processing the options which means the following have been set up: data observation, computed properties, methods, watch/event callbacks. However, the mounting phase has not been started, and the $el property will not be available yet.
15
16beforeMount: Called right before the mounting begins: the render function is
17about to be called for the first time.
18
19mounted: Called after the instance has just been mounted where el is replaced
20by the newly created vm.$el.
21
22beforeUpdate: Called when the data changes, before the virtual DOM is
23re-rendered and patched.
24
25updated: Called after a data change causes the virtual DOM to be re-rendered
26and patched.
27
28You can have a look at complete list here:
29https://vuejs.org/v2/api/#Options-Lifecycle-Hooks