React生命周期过程说明
2017-05-22 14:57
218 查看
React生命周期过程说明
初始化:
(getDefaultProps) -- 只调用一次,可以设置默认的props
getInitialState -- 初始化state,此时可以访问this.props
componentWillMount -- 仅执行一次
render
componentDidMount -- 仅执行一次
组件存在后,状态改变
接收到props参数,或者改变了state
componentWillReceiveProps -- 接收到新的props
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
组件销毁
componentWillUnmount
参考链接:
http://react-china.org/t/react/1740
初始化:
(getDefaultProps) -- 只调用一次,可以设置默认的props
getInitialState -- 初始化state,此时可以访问this.props
componentWillMount -- 仅执行一次
render
componentDidMount -- 仅执行一次
组件存在后,状态改变
接收到props参数,或者改变了state
componentWillReceiveProps -- 接收到新的props
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
组件销毁
componentWillUnmount
参考链接:
http://react-china.org/t/react/1740
相关文章推荐
- React组件生命周期过程说明
- React组件生命周期过程说明
- React组件生命周期过程说明
- React组件生命周期过程说明
- React组件生命周期过程说明
- React组件生命周期过程说明
- React组件生命周期过程说明
- React组件生命周期过程说明
- 以软件开发生命周期的过程来说明不同测试的使用情况
- React Native 学习-组件说明和生命周期
- react组件生命周期过程
- 以软件开发生命周期的过程来说明不同测试的使用情况
- react知识(二) 组件的生命周期【装载过程】
- react组件生命周期过程
- react组件生命周期方法说明
- React 组件生命周期的说明及相关API
- 用例子来说明面向对象和面向过程的区别(java)
- 哪位老大能够说明一下自己当初学习.net的具体过程。。。
- 关于进行Asp.net窗体验证的过程说明
- 第四部分 DB2 V7.X 版本SQL存储过程编译配置说明