React 生命周期分为三种状态 1. 初始化 2.更新 3.销毁
1.初始化:
defaultProps(获得默认属性)====>constructor(初始化) ==>componentWillMount==>render===>componentDidMount
2.数据更新
shouldComponentUpdate==>ComponentWillUpdate==>render===>ComponentWillUpdate
3.销毁
componentWillUnmount
React 生命周期分为三种状态 1. 初始化 2.更新 3.销毁
1.初始化:
defaultProps(获得默认属性)====>constructor(初始化) ==>componentWillMount==>render===>componentDidMount
2.数据更新
shouldComponentUpdate==>ComponentWillUpdate==>render===>ComponentWillUpdate
3.销毁
componentWillUnmount