dillon1000/react
Commit
Browse files Batch updates in initial render
Currently, the first setState that happens during initial render will start a new batch. Any subsequent updates will be batched. That means that the first setState is synchronous but any subsequent setStates are asynchronous. This commit makes it so that the batching starts at the root. That way all the setStates that happen within life-cycle methods are asynchronous.
Changed paths5 files
First-parent comparisonsrc/addons/ReactRAFBatchingStrategy.js ModifiedM src/browser/ui/ReactMount.js ModifiedM src/core/ReactDefaultBatchingStrategy.js ModifiedM src/core/ReactUpdates.js ModifiedM src/core/__tests__/ReactCompositeComponentState-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…