react簡書項目學習筆記10生命週期函數

生命週期函數指在某一時刻調用的函數 1.初始化 這時候執行的其實就是constructor 2.mount掛載 componentWillMount – render – componentDidMount 組件即將被掛載到頁面上–掛載–組件被掛載到頁面上之後執行 componentWillMount, componentDidMount只會在第一次的時候執行 3.update更新 組件更新有兩種
相關文章
相關標籤/搜索