dillon1000/react
Commit
Browse files act: Bypass microtask for "default sync" updates (#21740)
When wrapping an update in act, instead of scheduling a microtask, we can add the task to our internal queue. The benefit is that the user doesn't have to await the act call. We can flush the work synchronously. This doesn't account for microtasks that are scheduled in userspace, of course, but it at least covers React's usage.
Changed paths2 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberWorkLoop.new.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…