摘要:
参考:https://facebook.github.io/react/docs/components-and-props.html 一些独立,可重用的界面可以使用Components封装。 (一)Components定义 可以使用函数或者ES6的class定义Components,后者有一些额外的 阅读全文
摘要:
参考:https://facebook.github.io/react/docs/rendering-elements.html (一)Element 1.Element是react中最小的构建单元,是一个对象不是DOM,创建的代价比较低。 (1)通常我们在代码中使用JSX定义一个Element: 阅读全文