Video by Pachon in Motion / Pexels
React 19 introduces significant performance improvements that can make your applications faster without changing a single line of code. However, understanding these optimizations helps you write better React applications and leverage the new features effectively.
Automatic Batching Everywhere
React 19 extends automatic batching to all scenarios, not just event handlers:
React 18 Behavior
// Only batched in event handlers
function handleClick() {
setCount(c => c + 1);
setFlag(f => !f);
// ✅ Batched - single re-render
}
// Not batched in promises/timeouts
setTimeout(() => {
setCount(c => c + 1);
setFlag(f => !f)