争渡,争渡,惊起一滩鸥鹭

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

1. 挂载卸载过程

constructor()

componentWillMount()

render()

componentDidMount()

componentWillUnmount ()

 

2. 更新过程

componentWillReceiveProps (nextProps) (写在组件的)

shouldComponentUpdate(nextProps,nextState)

componentWillUpdate (nextProps,nextState)

render()

componentDidUpdate(prevProps,prevState)

 

 

 

参考文档:https://www.jianshu.com/p/b331d0e4b398

测试:https://www.runoob.com/react/react-component-life-cycle.html

 

posted on 2021-02-27 11:03  争渡~  阅读(47)  评论(0)    收藏  举报