Stop debugging React with console.log(this.props)
like it's 2005. React Developer Tools is Meta's browser extension that actually shows you what's happening in your components without turning your console into a graveyard of forgotten debug statements.
I used to spend hours adding console.log(this.props)
everywhere, forgetting to remove half of them, and shipping them to production where AWS was charging us like $180-ish/month just for my debug spam. You probably did the same shit. React DevTools shows you exactly what's broken without cluttering your code with debug statements you'll inevitably forget to clean up.
The official browser extension adds two tabs to DevTools: Components and Profiler. Install it from Chrome, Firefox, or Edge and thank me later.
The Components Tab: See What's Actually Happening
The Components tab shows your React component tree exactly like React sees it. Click any component and boom - you see its props, state, hooks, everything. No more wondering why UserProfile
is broken because you can literally see what props got passed to it.
Here's the magic: you can edit props and state directly. Click on any value and change it. No code changes, no rebuilds, no refresh. Toggle isLoading
to true, change that API response, break things on purpose to see what happens. This live editing feature saved my ass when debugging a checkout flow where the "Buy Now" button wasn't working - turns out isEnabled
was getting passed as a string "false" instead of boolean false.
Real example: I spent like 4 hours one Friday debugging why our UserCard component wouldn't render - just blank space where the card should be, no errors in console, no clues. Spent most of that time adding console logs everywhere like an idiot before finally opening DevTools. Took me another 20 minutes of clicking around before I noticed user.isActive
was undefined instead of the boolean I expected. Turns out the API was returning user: { id: 123, name: "John" }
but missing the isActive
field entirely because of some backend schema change nobody told us about. Could've saved my entire weekend if I wasn't too stubborn to open DevTools first.
The Profiler: Find What's Slow as Hell
The Profiler tab shows you which components are slow. That's it. Longer bars = slower components. Look for the longest bars and those are your problems.
Found a component creating new Date()
objects on every render? The profiler will show it. Components re-rendering 47 times per click? The profiler catches that too. I've seen apps where the ProductList component was calling new Date()
in the render function - every single render created a new date object. The profiler made it obvious with a giant red bar screaming "THIS IS YOUR PROBLEM."
The "why did this render?" info is gold. It tells you exactly what changed to trigger the re-render. If you see a component rendering because of props that didn't actually change, you've found an optimization opportunity. React's rendering behavior makes more sense when you can see it happening live.
Installation: 30 Seconds or 30 Minutes
Available for Chrome, Firefox, and Edge. Safari users get screwed and have to use the standalone version.
Installation takes 30 seconds unless Chrome decides to be weird:
- Go to your browser's extension store, search "React Developer Tools"
- Click install and pray the store doesn't hang
- Open DevTools (F12) on any React app
- Look for the "Components ⚛️" and "Profiler ⚛️" tabs
If you don't see the React tabs, either the site isn't using React, you're looking at a production build, or Chrome extensions randomly broke again. Production builds strip out debugging info for performance, which is smart but annoying when you're trying to debug staging.
React Native: Same Pain, Mobile Edition
React Native DevTools works the same way for mobile apps. Same component tree, same profiler, same prop editing. The difference? You have to connect through the Metro bundler and your phone will randomly disconnect right when you're in the middle of debugging a critical production issue.
React Native 0.76+ has built-in DevTools integration that actually works most of the time. Earlier versions require the standalone version (npm install -g react-devtools
) and some device menu shaking. Connection issues? Welcome to mobile development hell - restart Metro, shake your device until the dev menu appears, check that your phone and laptop are on the same WiFi network, restart the packager, clear the React Native cache with npx react-native start --reset-cache
, sacrifice a goat, whatever works.
Why Console Logging Sucks
Stop adding console.log(props)
to components. Just stop. You'll forget to remove them, ship them to production, and your team will judge you. ESLint can catch them, but you shouldn't need a linter to remind you not to debug like it's 2005.
React DevTools shows you props, state, hooks, and data flow without touching your code. No refreshes, no cleanup, no "oh shit I forgot to remove the console logs" moments. This is how React's creators intended you to debug - use their tool.
Production Debugging: You Don't
In production, React strips out debugging info for performance and security. Enabling DevTools in production would expose your app's internals to users and slow everything down.
Set up staging environments that mirror production but keep debugging enabled. For actual production bugs, use error tracking like Sentry or LogRocket. Don't try to debug live production with DevTools - that way lies madness.
Version Compatibility: Usually Fine
React 18, 19, hooks, server components, concurrent features - DevTools keeps up. The Meta team updates it regularly because they dogfood their own tools.
React 18 gotcha: Strict Mode makes components render twice in development, which makes the profiler timing look weird. That's expected behavior, not a bug.
Works With Everything (Probably)
Create React App, Next.js, Vite, custom Webpack configs - if it runs React in development mode, DevTools will work. TypeScript? Obviously supported. The extension reads TypeScript types and shows better prop information than plain JavaScript.
Bottom Line
Just install it. Every React developer has this extension. Debugging React without it is like coding with one hand tied behind your back.
Install it, learn the basics (component tree, prop editing, profiler), and stop making React development harder than it needs to be. Your future self will thank you when you're debugging at 3am and actually know what's breaking.