PureCode Software interview question

Explain how React batches updates and why batching is important for performance optimization in React applications?