Advanced React Hooks

Readings

  1. Kent's Should I useState or useReducer?
  2. Kent's How to implement useState with useReducer
  3. useTypescript — A Complete Guide to React Hooks and TypeScript by Trey Huffine
  4. Kent's When to useMemo and useCallback
  5. Memoization and React
  6. WTF is Closure
  7. Lifting state up
  8. Michael Jackson Tweet: Composition
  9. Kent's useEffect vs useLayoutEffect
  10. React docs: hook reference
  11. [ESLint] Feedback for 'exhaustive-deps' lint rule #14920
  12. Gupta Garuda: React Hooks - Understanding Component Re-renders
  13. StackOverFlow: When to use useImperativeHandle
  14. streamich/react-use
  15. Gabe Ragland: useHooks

Etc

  1. How to do lazy initialization with useReducer and useState
  2. Abortable fetch
  3. Is setState from useState and dispatch from useReducer guaranteed to be stable? What does that mean?
  4. What does it mean when the React docs say: "You may rely on useMemo as a performance optimization, not as a semantic guarantee."
  5. How does Object.is comparison algorithm work?
  6. Why does the React docs says "we recommend starting with useEffect first and only trying useLayoutEffect if that causes a problem"?