常用的生命周期函数

2022-11-11 09:17:46
常用的生命周期函数:componentDidMount componentWillUnmount componentDidUpdate 等等 React生命周期函数 生命周期函数是指在某一个周期自动执行的函数。 1。取得默认属性 getDefaultProps 外部传入的props 2。初始状态 getInitailState state状态 3。即将挂载 componentWillMount 4。描画VDOM render