- setState的改變會觸發(fā)4個生命周期鉤子
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
- props的改變會觸發(fā)5個生命周期鉤子
componentWillReveiceProps
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
componentWillReveiceProps
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate