装载阶段
组件第一次被渲染时的阶段,这一阶段相关的生命周期函数有:
constructor
componentWillMount
render
componentDidMount
更新阶段
如果组件中的 state 或者 props 发生了改变,React 就会更新该组件,此时会调用更新阶段中相关的生命周期函数:
componentWillReceiveProps
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
卸载阶段
componentWillUnmount



