Open Holayn opened 4 years ago
Good read: link
Vue app consists of components, where each has:
Creating a render function that creates a VNode, which is used by Virtual DOM patch process to create actual DOM elements. Note: if using build step, this is done there (i.e. using single file components)
set
), notifies WatchersnextTick
consumes and flushes all watchers in queue, then the render process is initiated.created()
- data and watchers are set up. no virtual dom yetbeforeMounted()
- before patch process, VNodes being created based on data/watchersmounted()
- after patch processbeforeUpdate()
- watcher updates VNode, fires patch process if data changeupdated()
- patch process donedestroyed()
- watchers removed
My take on its selling points: