Skip to content

Module 09: React Patterns

Custom hooks, the Context API, useReducer for complex state, useMemo/useCallback for performance, useRef, and patterns for composing components.

This module is planned. Full content coming soon.

Prerequisites

  • Module 08: React Fundamentals

What You'll Learn

  • Custom hooks: extracting stateful logic into reusable use* functions; the rules of hooks
  • useContext and createContext: sharing data without prop drilling; context performance considerations
  • useReducer: managing complex state transitions with a reducer function; when to use useReducer vs useState
  • useMemo and useCallback: memoizing values and functions to avoid unnecessary re-renders; measuring whether memoization actually helps
  • useRef: accessing DOM nodes imperatively, storing mutable values that don't cause re-renders
  • Composition patterns: render props, component injection, compound components