react 中 生命週期

生命週期函數 指在某一時刻組件會自動調用執行的函數 例如     當時 state 和props 發送改變是會自動執行  render 函數   1.Initializtion     初始化 props 和 state 2.Mounting  組件掛載     //在組件即將被掛載到頁面的時刻執行     componentWillMount(){           console.log('
相關文章
相關標籤/搜索