Code examples

Every example from the book, live in your browser

The book's 105 interactive examples, runnable and editable right here. Pick a chapter to browse its examples. Change the code and watch the result update.

  1. Chapter 17 examples

    Intro to re-renders

    Browse examples
  2. Chapter 23 examples

    Elements, children as props, and re-renders

    Browse examples
  3. Chapter 36 examples

    Configuration concerns with elements as props

    Browse examples
  4. Chapter 46 examples

    Advanced configuration with render props

    Browse examples
  5. Chapter 57 examples

    Memoization with useMemo, useCallback and React.memo

    Browse examples
  6. Chapter 68 examples

    Deep dive into diffing and reconciliation

    Browse examples
  7. Chapter 75 examples

    Higher-order components in modern world

    Browse examples
  8. Chapter 87 examples

    React Context and performance

    Browse examples
  9. Chapter 99 examples

    Refs: from storing data to imperative API

    Browse examples
  10. Chapter 105 examples

    Closures in React

    Browse examples
  11. Chapter 116 examples

    Implementing advanced debouncing and throttling with Refs

    Browse examples
  12. Chapter 124 examples

    Escaping Flickering UI with useLayoutEffect

    Browse examples
  13. Chapter 139 examples

    React portals and why do we need them

    Browse examples
  14. Chapter 149 examples

    Data fetching on the client and performance

    Browse examples
  15. Chapter 158 examples

    Data fetching and race conditions

    Browse examples
  16. Chapter 166 examples

    Universal error handling in React

    Browse examples
4.8 on Amazon · 4,500+ developers

Ready to actually understand React?

Stop guessing at re-renders and memoization. Get the 16 chapters that explain how React really works.

Read a free chapter

14-day money-back guarantee. Instant download, DRM-free.