Finding Memory Leaks

Tools

  1. Chrome DevTools → Memory → take a heap snapshot, use the app (open/close a page many times), take another snapshot and compare.
  2. DevTools → Performance monitor: watch JS heap size and DOM node count.
  3. Keep StrictMode on: it mounts → unmounts → mounts in development, so missing cleanups show up early.
  4. ESLint react-hooks rules catch missing dependencies.