dillon1000/react
Commit
Browse files [Fiber] Trigger default indicator for isomorphic async actions with no root associated (#33190)
Stacked on #33160, #33162, #33186 and #33188. We have a special case that's awkward for default indicators. When you start a new async Transition from `React.startTransition` then there's not yet any associated root with the Transition because you haven't necessarily `setState` on anything yet until the promise resolves. That's what `entangleAsyncAction` handles by creating a lane that everything entangles with until all async actions are done. If there are no sync updates before the end of the event, we should trigger a default indicator until either the async action completes without update or if it gets entangled with some roots we should keep it going until those roots are done.
Changed paths5 files
First-parent comparisonfixtures/view-transition/src/components/Page.js ModifiedM packages/react-reconciler/src/ReactFiberAsyncAction.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.js ModifiedM packages/react-reconciler/src/ReactFiberRootScheduler.js ModifiedM packages/react-reconciler/src/__tests__/ReactDefaultTransitionIndicator-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…