published fresh until

React: Profile a slow screen and fix interaction delays

Summary As of November 2026, record a delayed interaction, locate costly components and choose the matching fix for props, context, derived state or urgent rendering. Start with <Profiler> on React 19.3

Not for React Native list scrolling; see react-native-fast-list-empty-states

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: wrap the delayed screen in <Profiler id="Screen" onRender={record}> and record the same slow interaction to identify which component subtree consumes the rendering time.

As of November 2026, these branches target React 19.3, released 9 September. Record npm ls react react-dom. Add this Profiler callback around the existing screen in its parent:

import { Profiler } from 'react';

function record(id, phase, actualDuration, baseDuration) {
  console.table({ id, phase, actualDuration, baseDuration });
}

<Profiler id="Screen" onRender={record}>
  <Screen />
</Profiler>

Use React DevTools Profiler to locate the costly components, then narrow the boundary. Capture the interaction in the browser Performance panel too: React Performance tracks relate component work to other activity. actualDuration measures rendering, not the full interval between input and paint.

1. An expensive child renders when its meaningful inputs stay the same

As of November 2026, React 19.3 -> follow memo: minimizing prop changes. Wrap the child in memo, pass the scalar values it needs and remove newly constructed wrapper objects from that boundary. If a callback prop changes identity, use the useCallback example: const onSelect = useCallback(id => setSelected(id), []), where setSelected is the component's state setter. Include every reactive dependency when the callback reads other values.

Repeat an unrelated parent interaction. Require less child rendering and lower actualDuration; then select an item and confirm its behavior remains correct. If React Compiler is already active, inspect its existing memoization before adding manual calls. The memo reference explains the compiler's equivalent optimization.

2. A memoized child still renders after unrelated context updates

As of November 2026, React 19.3 -> follow memo: updating from context. Move the context read into a small outer component and pass only the needed scalar, such as theme, to the expensive memoized child. Context changes still update their consumers.

Trigger one context update that leaves theme unchanged and another that changes it. Require the costly child to skip the first and display the new theme after the second. Compare the same interaction's rendering duration.

3. An Effect immediately schedules a second render for derived data

As of November 2026, React 19.3 -> follow updating state from props or state. Replace an Effect that sets filtered rows with a calculation during rendering. If that calculation is expensive, use the guide's caching path: const visibleRows = useMemo(() => rows.filter(row => row.name.includes(query)), [rows, query]), importing useMemo from React.

Repeat the filter interaction and require removal of the extra commit caused by the derived-state setter. Confirm the new query displays the right rows, including an empty result. Retain Effects that synchronize external systems.

4. Each keystroke legitimately changes an expensive results component

As of November 2026, React 19.3 -> follow useDeferredValue: deferring a subtree. Import useDeferredValue from React and keep the controlled input on query. Pass const deferredQuery = useDeferredValue(query) to a memoized results component. Keep its other props stable so it can skip the urgent render while the deferred query is unchanged.

Compare typing-to-paint timing and require the input to respond promptly, with results catching up after typing pauses. This allows stale results and interruptible background rendering. It does not make the calculation cheaper or prevent a request on every keystroke. Hook caveats

Evidence and limits

pumanitro's 19 March 2019 report describes context updates bypassing prop-based memoization in React 16.8.4. It is historical evidence for the context branch, whose behavior remains documented in the current memo reference; it is not a React 19.3 regression claim.

Profiling adds overhead and ordinary production builds disable it. For comparisons closer to production, follow the profiling-build guidance, using the same build mode, device, data and interaction sequence before and after a change. Require both an improved component profile and an improved input-to-paint interval. If the trace locates the delay in event-handler computation, layout, painting or a network wait, address that activity separately.

Not for: React Native list scrolling; see react-native-fast-list-empty-states

Started from a post by @The React Team, packaged by the editor. Original post

Subjects

More in testing

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# React: Profile a slow screen and fix interaction delays
Summary: As of November 2026, record a delayed interaction, locate costly components and choose the matching fix for props, context, derived state or urgent rendering. Start with `<Profiler>` on `React 19.3`
Copy for agent
get the whatworks thread react-profile-screen-fix-interaction-delays and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread react-profile-screen-fix-interaction-delays
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp