2026-06-17 · React

Track down unnecessary re-renders in a data table

Use the React DevTools profiler to find the component that repaints the whole grid.

Introduction

A debugging walkthrough covering prop identity, where memo actually belongs, and state that should live outside your heaviest list.

Field notes

A few patterns we kept seeing while puttering around React problems:

  • The simple version survived every refactor; the clever version didn’t.
  • Documentation written during the work aged far better than documentation written after.
  • The second time a problem shows up, it is already a pattern — name it.

A checklist you can steal

  • The failure is reproducible with one command.
  • The fix has a test that fails without it.
  • Someone other than the author has run it on their machine.

Closing

Write the short version future-you will actually read. That is the whole trick.