首页 > 其他 > 详细

React 生命周期函数

时间:2019-08-10 18:07:22      阅读:91      评论:0      收藏:0      [点我收藏+]

React v16.4 生命周期图示

技术分享图片

 

一、组件挂载阶段(Mounting)

1、constructor()

2、static getDerivedStateFromProps()

3、render()

4、componentDidMount()

 

二、组件更新阶段(Updating)

1、static getDerivedStateFromProps()

2、shouldComponentUpdate()

3、render()

4、getSnapshotBeforeUpdate()

5、componentDidUpdate()

 

三、组件卸载阶段(Unmounting)

1、componentWillUnmount()

 

React 生命周期函数

原文:https://www.cnblogs.com/Leophen/p/11332362.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!