Skip to main content

Concurrent rendering mental model

“Concurrent React” does not mean React runs your component code on several JavaScript threads at once.

The practical model is:

React can prepare some renders with lower priority, interrupt them, abandon obsolete work, and commit only the result that matters.

Render and commit are different phases​

Not every render attempt commits
State update
Render work
May be interrupted, restarted, or discarded.
Commit
Apply DOM/host changes.
Layout / passive Effects run at their phases

The critical rule is that rendering is preparation; commit is the externally visible result.

Rendering must be pure​

Bad:

function Invoice({ invoice }) {
localStorage.setItem('lastInvoice', invoice.id);
return <h1>{invoice.number}</h1>;
}

React might run that component while preparing work that never commits. External writes, subscriptions, analytics, DOM mutation, and network mutation do not belong in render.

Good:

function Invoice({ invoice }) {
return <h1>{invoice.number}</h1>;
}

Then put external work in event/Action/Effect logic according to why it happens.

Priority is a UX decision​

Separate immediate interaction from expensive presentation
Urgent
Typing · pressed state · focus · selection · dragging.
Often non-urgent
Route navigation · large tab contents · filtered analytics · heavy visualizations.

Transitions and deferred values let you express this priority relationship.

Interruption​

1Render expensive chart for filter A
2User types
3Urgent input render takes priority
4Old chart work can be discarded
5Chart restarts for latest state

Concurrency improves responsiveness because urgent interaction does not need to wait for every lower-priority render attempt to finish.

Obsolete intermediate UI does not need to commit​

Suppose the user selects filters A → B → C quickly.

React can skip an obsolete intermediate result
A committed
B rendering
B can be abandoned
C commits

The goal is not to preserve every intermediate frame. The goal is to keep the UI responsive and eventually commit the latest valid result.

Each render still has an isolated snapshot​

Concurrency does not make state variables mutate under a running render.

Snapshots remain isolated
Render A
Sees snapshot A.
Render B
Sees snapshot B.

React may prepare those renders at different times, but each render remains conceptually pure and snapshot-based.

Concurrency is not parallel JavaScript execution​

A Transition does not create thread 1 for input and thread 2 for a chart. React still uses JavaScript's execution environment and scheduler; platform tools such as Web Workers are separate mechanisms for actual off-main-thread computation.

Scheduling is not multithreading
React concurrency
Prioritize, yield, interrupt, restart render work.
Web Worker
Move suitable JavaScript computation to another thread.

How the concurrency APIs fit together​

Priority, lag, and readiness are separate dimensions
UPDATE PRIORITYuseTransition
Mark an update you initiate as non-urgent.
CONSUMPTION PRIORITYuseDeferredValue
Let one consumer temporarily lag behind a changing value.
READINESS / REVEALSuspense
Coordinate what is shown when part of the render is not ready.

useTransition​

const [isPending, startTransition] = useTransition();

startTransition(() => {
setPage(nextPage);
});

useDeferredValue​

const deferredQuery = useDeferredValue(query);

Suspense​

A lower-priority render can suspend while React preserves useful already-revealed content until the new result is ready.

Concurrency + Suspense background flow
Transition / deferred work starts
Subtree suspends
Resource/code becomes ready
Commit latest tree

lazy adds code readiness​

A lazy component may suspend because its module has not loaded yet. That gives React another reason a background render may not be ready to commit.

Concurrency + Suspense coordinates that delay without requiring every navigation to destroy the current page.

Effects belong to committed UI​

A background render that never commits should not synchronize external systems.

Only committed UI owns committed Effects
Abandoned render
No committed DOM result → no Effects for that abandoned result.
Committed render
Host updates land → appropriate Effects can run.

If Suspense hides already visible content, layout Effect cleanup/re-setup follows the visible committed layout lifecycle.

Strict Mode teaches the same design discipline​

Strict Mode development checks can expose assumptions such as “render happens exactly once” or “Effect setup happens exactly once.”

Do not treat Strict Mode's development behavior as a literal production scheduler simulation. The design lesson is that code must remain correct when React renders, discards, retries, or replays work before commit.

Priority APIs are not timing contracts​

Do not write logic that depends on “Transition starts after X ms” or “deferred value always lags by 300ms.” These APIs express priority, not fixed timing.

React may complete lower-priority work almost immediately on a fast device.

Responsive scheduling does not remove CPU cost​

If a list renders 50,000 DOM nodes, consider architecture and performance work such as virtualization, pagination, better data structures, component boundaries, memoization where justified, Compiler optimization where applicable, or moving non-render CPU work off the main thread.

Concurrency changes scheduling, not the amount of work
Scheduling problem
Urgent work is blocked by non-urgent rendering → concurrency APIs can help.
Cost problem
Render/DOM/computation is simply too large → reduce the work too.

Data consistency is a separate responsibility​

React scheduling does not automatically solve stale network responses, optimistic conflicts, cache invalidation, transaction semantics, authorization changes, or broken external-store snapshots.

React decides when rendering work is urgent. Your data architecture decides which data is valid.

Complete search flow​

const [query, setQuery] = useState('');
const deferredQuery = useDeferredValue(query);
1User types
2query commits urgently
3old deferredQuery may remain
4React prepares latest results
5new typing can interrupt
6latest completed results commit

Suspense can keep stale deferred results visible if new data is not ready.

Complete navigation flow​

startTransition(() => {
setRoute(nextRoute);
});
1Navigation event
2Route update marked non-urgent
3Lazy/data work may suspend
4Current route can stay visible
5New navigation may supersede old work
6Latest ready route commits

Senior design rule​

Concurrency is most useful when architecture already separates urgent interaction state from expensive derived presentation.

What should you fix first?
Urgent UI is blocked by non-urgent render workExpress priority with Transition/deferred value
Whole app re-renders because ownership is broadFix state/context/store boundaries first
DOM/computation is intrinsically hugeReduce/virtualize/offload the work
Data can arrive out of orderFix consistency in the data layer

Common mistakes​

  • side effects during render;
  • interpreting every abandoned render as a bug;
  • using concurrency to hide poor state ownership;
  • assuming old UI is always safe to preserve;
  • treating priority APIs as request-ordering or timing tools.

Debugging concurrency​

Ask:

  1. Which state is urgent?
  2. Which update is a Transition?
  3. Which value is deferred?
  4. Which subtree is expensive?
  5. Does it suspend?
  6. Which boundary handles that suspension?
  7. Can render work be interrupted safely?
  8. Are there render side effects?
  9. Is stale UI acceptable?
  10. Is the real bottleneck render cost, network, computation, or DOM volume?

Exercise​

Build an analytics explorer with controlled search input, a large result list, lazy chart, Transition tab switch, deferred search value, and Suspense boundaries. Instrument renders and identify which attempts commit, which can be interrupted, and which UI is allowed to stay stale.

Interview questions​

Beginner: Does concurrent rendering mean React runs components on multiple threads?

Intermediate: Why must render functions remain pure if React can interrupt or abandon work?

Senior: Explain how urgent state, Transition updates, deferred values, Suspense, code splitting, and commit semantics interact during slow navigation with continued user input.

Summary​

Concurrent rendering mental model
Prioritized render preparation
Obsolete attempts can be discarded
Only latest completed result commits

Concurrency means prioritized, interruptible rendering—not multithreaded component execution.

References​

Next​

Next, move from client concurrency into React DOM, portals, hydration, SSR, streaming, and server rendering.