React Function Component Pattern 2:用 useRef / useEffect / useCallback 封裝 callback 函數
Pure Component 是 React 中常見提升效能的方式,如果傳遞 props 給 Pure Component 時有用到 propA={{…props.A}}
或 onChange={(e) => {...}}
,那有用 Pure Component 跟沒用一樣,因為每次 render 都還是會產生新的物件或函數,所以…