Part 3 - template compiler

This is the only part I won’t implement “from scratch” (maybe sometime in the future).

What template compiler does is convert “pseudo-html” template and convert it into h function. You can fiddle with vue template explorer to see how it works (and what kind of optimizations it offers).


<div id="app">
    <span>hello world</span>

will be converted into:

h("div", {
    id: "hello",
}, [
    h("span", "world"),