React之生命週期函數

一:Mounting 1:componentWillMount():在組件即將掛載在頁面的時刻自動執行 2:render(): 3:componentDidMount():在組件掛載在頁面後的時刻自動執行 二:Updation 1:componentWillReceiveProps():需要滿足三個條件纔會執行 一個組件要從父組件接受參數如果這個組件第一次存在父組件中,不會執行 如果這個組件已經存
相關文章
相關標籤/搜索