Concurrent Rendering Mental Model
Understand the shift from synchronous to concurrent rendering in React 18 and its implications for render purity.
React 18 introduced Concurrent Rendering as an opt-in capability (enabled by using the new createRoot API rather than the legacy ReactDOM.render), fundamentally changing rendering from an all-or-nothing synchronous operation into an interruptible process that React can pause, resume, or even discard partway through — made possible by the Fiber architecture's unit-of-work model.
Concurrent rendering is like a chef who can pause mid-recipe to handle a rush order that just came in, and either resume the paused dish exactly where they left off or, if the original order changed while they were interrupted, just start that dish over completely — which is fine as long as nothing about preparing the dish has an irreversible side effect that shouldn't happen more than once, like an ingredient that can't be un-added if the dish gets restarted.