React生命周期及执行顺序
React执行可分为三个阶段:装载、更新和卸载;
装载阶段:
componentWillMount
render
componentDidMount
更新阶段:
componentWillRecieveProps
shouldComponentUpdate
componentWillUpdate
Render
componentDidUpdate
卸载阶段:
componentWillUnmount
更加详细的说明:->
componentWillMount
render
componentDidMount
componentWillRecieveProps
shouldComponentUpdate
componentWillUpdate
Render
componentDidUpdate
componentWillUnmount
更加详细的说明:->
原文作者:ylinwind
原文链接:https://ylinwind.github.io/2019/04/02/ylin-react-20190402/
发表日期:April 2nd 2019, 9:50:33 pm
更新日期:April 2nd 2019, 9:59:02 pm
版权声明:本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可