類組件由繼承 Component 組件改為繼承 PureComponent 組件,就不用再寫 shouldComponentUpdate 生命週期函數判斷參數有無變化來控制組件的渲染。
確定! 回上一頁