finds.dev← search

// the find

welldone-software/why-did-you-render

★ 12,523 · JavaScript · MIT · updated Apr 2026

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

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →