Back to results for “Hooks”
React › Strict Mode & Concurrent Features

What are concurrent features in React, and how do they relate to Strict Mode?

Advanced

Answer

Concurrent features let React prepare more than one version of the user interface at the same time, pausing and resuming work as needed, so the app stays responsive even while handling a large or slow update. Strict Mode helps prepare your code for this by catching patterns that would not work reliably if React decided to pause, restart, or throw away an in progress render.
// A component written safely for concurrent rendering, avoiding side effects during render
function ProductList({ products }) {
  const sorted = useMemo(() => [...products].sort(), [products]); // pure, safe to be called multiple times
  return <List items={sorted} />;
}
Real-world example A team adopts useTransition for a slow filtering feature, and thanks to already having fixed several issues revealed by Strict Mode beforehand, the concurrent rendering feature works correctly without any unexpected bugs.

Common follow-ups: What specifically makes a component 'safe' for React's concurrent rendering?;How does automatic batching, another concurrent feature, change how multiple state updates are handled together?