React Native 生命周期
2016-09-21 16:38
411 查看
ReactJS :
应用由组件来组成,类似于xml ,非常清晰,每个组件维护自己的状态和UI,改变的时候自动重新渲染
全局对象: React
生命周期:
创建: getDefaultProps : 可以自定义新属性,自动和父组件的属性合并
2 实例化: getInitalstate : 处理this.state属性
3 逻辑处理: componentWillmount
4 render: 根据state渲染虚拟DOM节点并返回虚拟DOM,并将结构返回
5 componentDidMount 使用render方法返回的虚拟DOM对象,来创建真是的DOM,可以通过this.getDOMNode()获取当前组件的节点
更新:
1 componentWillReceiveProps()
2 shouldComponentUpdate()
3 componentWillUpdate()
4 componentDidUpdate()
销毁:
component W illUnmount()
应用由组件来组成,类似于xml ,非常清晰,每个组件维护自己的状态和UI,改变的时候自动重新渲染
全局对象: React
生命周期:
创建: getDefaultProps : 可以自定义新属性,自动和父组件的属性合并
2 实例化: getInitalstate : 处理this.state属性
3 逻辑处理: componentWillmount
4 render: 根据state渲染虚拟DOM节点并返回虚拟DOM,并将结构返回
5 componentDidMount 使用render方法返回的虚拟DOM对象,来创建真是的DOM,可以通过this.getDOMNode()获取当前组件的节点
更新:
1 componentWillReceiveProps()
2 shouldComponentUpdate()
3 componentWillUpdate()
4 componentDidUpdate()
销毁:
component W illUnmount()
相关文章推荐
- React Native实战之ReactJS组件生命周期
- React Native 中组件的生命周期
- React Native 中 component 生命周期
- React-Native生命周期详解
- react-native笔记-----组件的生命周期
- 【RN基础02】React Native生命周期完全解析
- React Native 中 component 生命周期
- React Native 中 component 生命周期
- react-native 组件的生命周期
- 【RN - 基础】之React Native组件的生命周期
- React Native组件的生命周期
- React Native生命周期整理
- React Native 中组件的生命周期
- React Native之生命周期
- react-native 组件生命周期
- React Native组件生命周期
- 从零开始 React Native (4) React入门_状态属性_生命周期
- react-native--生命周期
- React Native之生命周期
- react-native生命周期