React createClass 和 Component 有什么区别
2017-01-04 14:57
495 查看
1、React在ES6的实现中去掉了getInitialState这个hook函数,规定state在constructor中实现,如下:Class App extends React.Component { constructor(props) { super(props); this.state = {}; } }
相关文章推荐
- (二)ReactNatice命令总结
- ReactNative入门之props与state
- react-native 传值
- React-Native Issue: PCH was compiled with module cache path
- ReactiveX编程范式
- react native Component 生命周期
- React 还是 Vue: 你应该选择哪一个Web前端框架?
- react native 定位
- React-Native工程项目打包编译发布过程详解
- React Native Navigator 的路由以及页面跳转
- react-native 基础:react-native-router-flux 的使用[意译]
- reactor和proactor模式
- react.js快速入门(2)
- React Native FlexBox
- ReactNative入门之编写HelloWorld
- React-Native之Navigator
- React入门到精通(二)——React基础实例
- React入门到精通(一)
- ReactNative环境搭建与初始化项目
- 真机远程调试 ( IOS Android 以及微信,weex, react native)