挂载阶段:
【重点】 componentDIdMount一般在这个生命周期做数据请求 axios/ajax
constructor
=> componentWillMount
=> ender
=> componentDidMount
更新阶段:
只有shouldComponentUpdate返回true组件才会渲染,返回false组件不渲染
state更新:
shouldComponentUpdate
=>componentWillUpdate
=> render
=> componentDidUpdate
props更新:
componentWillReceiveUpdate
=> shouldComponentUpdate
=> componentWillUpdate
=> render
=>componentDidUpdate
卸载阶段
componentWillUnmount