解析vue2.0中render:h=>h(App)的具体意思

render:h=>h(App)是ES6中的箭头函数写法,等价于render:function(h){return h(App);}.

注意点:
1.箭头函数中的this是 指向 包裹this所在函数外面的对象上。

2.h是creatElement的别名,vue生态系统的通用管理

3.template:‘<app/>’,components:{App}配合使用与单独使用render:h=>h(App)会达到同样的效果
  前者识别<template>标签,后者直接解析template下的id为app的div(忽略template的存在)
原文地址:https://www.cnblogs.com/xiaoqi2018/p/10642623.html