What is the difference between blocking and concurrent rendering?
Blocking Rendering (Traditional React)
- React processes updates one at a time and can’t be interrupted once it starts.
- If a render takes a long time (e.g., complex components, heavy calculations), the entire app becomes unresponsive until the render is complete.
- Even minor interactions like typing or clicking can feel laggy during heavy rendering.
- Rendering happens in a synchronous and non-prioritized way — no matter how important the update is.
Concurrent Rendering (Concurrent Mode)
- React can pause, interrupt, and even abandon a render if something more important happens.
- Rendering is split into small chunks and spread across frames, keeping the app feeling smooth and responsive.
- Urgent updates (like typing) are prioritized, while less urgent work (like lazy-loading a sidebar) happens in the background.
- Rendering becomes asynchronous and priority-based, allowing React to adapt better to real-world user interactions.
Quick Comparison Table:
Aspect | Blocking Rendering | Concurrent Rendering |
---|---|---|
Interruptible? | ❌ No | ✅ Yes |
Priority System? | ❌ No | ✅ Yes |
Responsiveness | ❌ Can freeze UI | ✅ Stays responsive |
Update Type | Synchronous | Asynchronous |
Typical Usage | Classic React apps | Modern apps with heavy interactivity |