5 Things to remember when it comes to React.memo, useMemo, useCallBack

Source: Mastering React Memo

  1. React.memo is not a traditional memoization
    • React just looks at the previous value and compares it to the new one
  2. Think of React.memo as "Render if props have changed"
  3. useMemo and useCallBack are for reference identity
    • useMemo: objects and arrays
    • useCallBack: functions
  4. Use useMemo for expensive calculations
  5. Don't sweat component re-renders too much