02/02/2026
What is Batching in React?
Batching in React means grouping multiple state updates into a single render instead of re-rendering the UI again and again.
When you call setState multiple times, React is smart enough to batch them together and update the UI once, making your app faster and smoother.
Why batching is important?
Improves performance
Reduces unnecessary re-renders
Makes React apps feel fast
Before batching:
Multiple state updates = Multiple renders
With batching:
Multiple state updates = One render
In React 18, batching works even in:
setTimeout
Promises
Event handlers
Async functions
Result: Cleaner code + better performance
Image idea:
State updates β Batch β Single Render