react之生命週期

react的生命週期主要分爲:初始化,更新,卸載 初始化: componentDidMount是指組件被插入到DOM中時,觸發 更新:componentDidUpdate是指傳入新的props,或者調用setState()或者調用forceUpdate()時觸發,componentDidUpdate(currentProps, currentState)接收兩個兩個參數. currentProps
相關文章
相關標籤/搜索