git404hub

what is why-did-you-render fr?

welldone-software/why-did-you-render — explained in plain English

Analysis updated 2026-06-24

12,475JavaScriptAudience · developerComplexity · 2/5Setup · easy

tl;dr

A React development tool that logs to your browser console whenever a component re-renders unnecessarily, showing exactly what changed so you can quickly find and fix performance issues in your app.

vibe map

mindmap
  root((why-did-you-render))
    What it does
      Detect re-renders
      Log what changed
      Track custom hooks
    Setup
      Dev mode only
      Small config file
      React Native support
    Use Cases
      Performance debugging
      Hook tracking
      Component optimization
    Audience
      React developers
      Frontend engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Find React components that re-render on every state change even when their actual data hasn't changed.

VIBE 2

Debug why a specific component is slow by seeing the exact prop or state value that triggered the redraw.

VIBE 3

Track unnecessary re-renders caused by custom hooks like React Redux in your component tree.

VIBE 4

Catch performance issues in React Native mobile app components before they reach production.

what's the stack?

JavaScriptReactReact Native

how it stacks up fr

welldone-software/why-did-you-rendertheodinproject/curriculumpiskelapp/piskel
Stars12,47512,47312,465
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencedevelopergeneraldesigner

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Must only run in development mode, never include in a production build as it patches React internals and slows the app.

in plain english

This is a developer debugging tool for React, the popular JavaScript library used to build web and mobile interfaces. The library's name, why-did-you-render, describes exactly what it does: it watches your React components and tells you in the browser console when one of them re-drew itself for a reason that could have been avoided. In React, components can redraw unnecessarily when they receive a new object or function that looks the same as before but is technically a different value in memory. These redundant redraws waste processing time, especially in large applications. The tool detects these cases and logs a message explaining what changed and which component was affected, so a developer can find and fix the root cause. Setup involves installing the package as a development dependency and adding a small configuration file that activates the tool only when the app is running in development mode. The README is explicit that the tool must never run in a production build: it slows React down noticeably and patches React internals in ways that could cause unexpected behavior in a live app. It works with both standard React web apps and React Native mobile apps. You can track all qualifying components at once or opt individual components in by setting a flag on them. The tool also supports tracking custom hooks, so if you use a state-management hook from a library like React Redux, it can watch that hook as well and report when it causes an avoidable update. The project is tested against React 19. Earlier React versions have separate versioned branches with their own setup instructions, linked from the README.

prompts (copy fr)

prompt 1
My React app feels sluggish. Help me set up why-did-you-render to monitor all components and log unnecessary re-renders to the console during development.
prompt 2
A specific component in my app re-renders too often. Show me how to enable why-did-you-render tracking on just that one component using the whyDidYouRender flag.
prompt 3
I'm using a custom Redux hook and suspect it's causing extra re-renders. How do I configure why-did-you-render to track that specific hook?
prompt 4
Show me a typical why-did-you-render console log message and explain what each part means so I know exactly how to fix the issue it reports.

Frequently asked questions

what is why-did-you-render fr?

A React development tool that logs to your browser console whenever a component re-renders unnecessarily, showing exactly what changed so you can quickly find and fix performance issues in your app.

What language is why-did-you-render written in?

Mainly JavaScript. The stack also includes JavaScript, React, React Native.

How hard is why-did-you-render to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is why-did-you-render for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.