React鉤子函數

react組件生命週期,如下圖所示, 在組件運行過程中,constructor、componentWillMount、componentDidMount、render都是持續運行的,其他的函數會在一定條件下觸發。 執行順序: constructor -> componentWillMount -> render -> componentDidMount constructor在組件初始化時觸發,可
相關文章
相關標籤/搜索