深度解析 react createElement

1.react.createElement 是一个函数

createElement(type,config,children)

* type : 创建的dom类型 比如说:a标签 div 等等...
* config : dom 结构上所有的属性attr 比如说 href style
onClick 方法等
* children:标签中间的内容

评论

暂无评论