finds.dev

welldone-software/why-did-you-render

why-did-you-render by Welldone Software monkey patches React to notify you about potentially avoidable re-renders. (Works with React Native as well.)

View on GitHubHomepage ↗

★ 12,523JavaScriptMITupdated Apr 2026

// the take

A React devtools library that monkey-patches React to log why a component re-rendered — same props by reference but different values, or genuinely no reason at all. It's for developers chasing a specific perf problem in dev mode, not something you leave running.

Actually explains the re-render, not just that one happened — diffs props/state/hooks and prints what changed, including the owner component that caused it via logOwnerReasons. Tracks hooks (useState, useReducer, useContext, custom hooks like react-redux's useSelector) which most re-render profilers ignore. TypeScript types ship in the package, and the babel importSource setup means you don't have to manually wrap components.

Hard version-pinned to whatever React major you're on — React 19 only in master, with separate branches for 17/18, so upgrading React later means re-checking this too. Explicitly untested against React Compiler and the maintainer says they believe it's incompatible, which matters more every month as Compiler adoption grows. Monkey-patching React means it's dev-only by design (README is blunt about this) and any weird React internals change can break it silently. trackExtraHooks has a known unresolved webpack issue (#85) that's been open a while, so the one feature aimed at libraries like react-redux needs a workaround out of the box.

We read the README, the directory tree and a key source file in September 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
12,523
Forks
224
Language
JavaScript
License
MIT
Last commit
15 Apr 2026

// nearby

If why-did-you-render isn't quite it.

All repos →