dillon1000/react
Commit
Browse files root.createBatch (#11473)
API for batching top-level updates and deferring the commit. - `root.createBatch` creates a batch with an async expiration time associated with it. - `batch.render` updates the children that the batch renders. - `batch.then` resolves when the root has completed. - `batch.commit` synchronously flushes any remaining work and commits. No two batches can have the same expiration time. The only way to commit a batch is by calling its `commit` method. E.g. flushing one batch will not cause a different batch to also flush.
Changed paths6 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMRoot-test.internal.js ModifiedM packages/react-dom/src/client/ReactDOM.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.js ModifiedM packages/react-reconciler/src/ReactFiberRoot.js ModifiedM packages/react-reconciler/src/ReactFiberScheduler.js ModifiedM packages/react-test-renderer/src/ReactTestRenderer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…