The Mental Model: Traffic Lights vs First-Come-First-Served
You'll learn how to think about concurrent rendering using a real-world analogy that makes React's priority system intuitive.
The Traditional Queue Model (First-Come-First-Served)
Before concurrent features, React worked like a bank with one teller serving customers in strict order. The first person in line gets served completely before anyone else, no matter how urgent their need. If someone needs 30 minutes to complete a complex transaction, everyone behind them waits—even someone who just needs a quick answer.
This is the First-Come-First-Served model: sequential, predictable, but inflexible.
The Concurrent Model (Traffic Lights)
Concurrent React works like a smart traffic light system managing intersections. The traffic light:
- Gives green lights to urgent traffic (emergency vehicles, main roads during rush hour)
- Makes less urgent traffic wait momentarily
- Constantly re-evaluates priorities based on current conditions
- Ensures no direction waits forever (starvation prevention)
When you type in an input field, that's an emergency vehicle—it gets immediate priority. When you trigger a transition update to filter a large list, that's regular traffic that can wait at a red light while React handles more urgent work.
Why This Matters
Understanding this mental model helps you design better UIs. You stop thinking "this update takes 200ms and blocks everything" and start thinking "this update can yield control so the UI stays responsive."
The traffic light doesn't make any single car faster—it makes the entire intersection flow better. Similarly, concurrent features don't make your components render faster, but they make your entire app feel more responsive.
Key Takeaway: Think of concurrent rendering as a traffic control system that prioritizes urgent updates while ensuring all work eventually completes, not as a sequential queue where updates must finish in order.