December 2017
Beginner to intermediate
376 pages
7h 53m
English
Let's change tack now and discuss how Vue renders components. Take a look at this example:
Vue.component('my-component', { template: '<div id="my-component">My component</div>' });
In order for Vue to be able to render this component to the page, it will first transform the template string into a JavaScript object using an internal template compiler library:

Once the template has been compiled, any state or directives can easily be applied. For example, if the template includes a v-for, a simple for-loop can be used to multiply the nodes and interpolate ...
Read now
Unlock full access