Render Functions & JSX Basics Vue recommends using templates to build your HTML in the vast majority of cases. There are situations however, where you really need the full programmatic power of JavaScript. That’s where you can use the render function
vue2.0之render函数 虽然vue推荐用template来创建你的html,但是在某些时候你也会用到render函数. 虚拟DOM Vue 通过建立一个虚拟 DOM 对真实 DOM 发生的变化保持追踪.请近距离看一下这行代码: return createElement('h1', this.blogTitle) createElement 到底会返回什么呢?其实不是一个实际的 DOM 元素.它更准确的名字可能是createNodeDescription,因为它所包含的信息会告诉 Vu