Skip to main content
useDeferredValue is a React Hook that lets you defer updating a part of the UI.

Parameters

T
required
The value you want to defer. It can be of any type.
T
Optional value to use during the initial render. If omitted, useDeferredValue will return value on initial render, then schedule a re-render with the deferred value.This parameter is useful to avoid showing a blank screen on the first render.

Returns

  • During the initial render, the returned deferred value will be the same as the value you provided (or initialValue if provided)
  • During updates, React will first attempt a re-render with the old value (matching the old value), then try another re-render in background with the new value (matching the updated value)

Usage

Showing stale content while fresh content is loading

Call useDeferredValue at the top level of your component to get a deferred version of that value:
When the user types, the input updates immediately (using query), but the results update with a slight delay (using deferredQuery). This keeps the input responsive.

Indicating that the content is stale

Show a visual indication while the deferred value is updating:

Deferring re-rendering for a part of the UI

You can also use useDeferredValue as a performance optimization:
This optimization requires the children to be wrapped in memo. Without memo, React will re-render the entire subtree anyway.

Common Patterns

Search with deferred results

Filter with deferred updates

Table with deferred sorting

TypeScript

useDeferredValue vs useTransition

Use when:
  • You receive a value from props or a parent component
  • You don’t control the state update
  • You want to defer rendering based on a value

Troubleshooting

The deferred value never updates

Make sure the component using the deferred value can re-render:

My UI still feels slow

Make sure the expensive work is actually being deferred:

The deferred update happens immediately

If React has nothing else to do, it will update the deferred value immediately:
This is expected. Deferring only helps when rendering is expensive.

Should I defer all values?

No! Only defer values when:
  • Rendering is expensive and takes >50ms
  • You want to keep the UI responsive during updates
  • The delayed update won’t confuse users
Don’t defer when:
  • Rendering is fast (less than 50ms)
  • Users expect immediate feedback
  • The value controls critical UI

Best Practices

Show loading indicators

Combine with memo

Use with useMemo

Performance Considerations

When to use useDeferredValue

Measure before optimizing