Course contentsShow
← React
Lesson 2218 of 2,39649. Performance: Identifying ProblemsFree lesson

Profiler Settings: Highlighting Updates and Recording Why

Configuring the Profiler to highlight component updates on-screen and always record reasons for renders.

Profiler Settings: Highlighting Updates and Recording Why

What you'll learn: How to configure React DevTools Profiler to visually highlight component updates on screen and automatically record the reasons behind each render.

Enabling Visual Feedback

The Profiler's settings panel contains powerful options that make performance debugging much easier. The first is "Highlight updates when components render"—when enabled, React overlays a colored border around components as they re-render in real-time. This visual feedback helps you immediately spot unexpected updates without even starting a profile recording.

Think of it like thermal imaging for your app: hot spots (frequent re-renders) flash repeatedly, while stable components stay quiet. You can interact with your UI and watch the highlights appear, making it obvious when clicking a button causes the entire page to re-render versus just the intended component.

Recording Render Reasons

The second critical setting is "Record why each component rendered while profiling". When enabled, the Profiler captures detailed explanations for every render: which props changed, which state updated, which hooks triggered the update, or whether a parent component forced the re-render.

This information appears in the commit details panel when you inspect a component. Without this setting enabled, you'd see that a component rendered but not why—like knowing a fire alarm went off but not knowing if it was smoke or a false alarm.

Note: Recording "why" adds slight overhead, so you might disable it for very performance-sensitive profiling sessions where you only need timing data.

When to Use These Settings

Enable highlights during active development to catch re-render bugs immediately. Enable "record why" when profiling to understand the root causes of performance issues—it's essential for diagnosing unnecessary renders.

Key Takeaway: Profiler settings for highlighting updates and recording render reasons transform the tool from a passive recorder into an active debugging assistant that shows you both what is rendering and why.