Opt-in to Automatic Batching with createRoot

InstructorMichael Chan

Share this video with your friends

Send Tweet

In previous versions of React, state update batching only happened inside of event handlers. In React 18, all updates are batched, regardless of when or where they are called. Opt into automatic batching with createRoot.