dillon1000/react

Commit

[Synchronous Suspense] Reuse deletions from primary tree (#14133)

Fixes a bug where deletion effects in the primary tree were dropped
before entering the second render pass.

Because we no longer reset the effect list after the first render pass,
I've also moved the deletion of the fallback children to the complete
phase, after the tree successfully renders without suspending.

Will need to revisit this heuristic when we implement resuming.
Browse files
Changed paths4 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberBeginWork.js ModifiedM packages/react-reconciler/src/ReactFiberCompleteWork.js ModifiedM packages/react-reconciler/src/ReactFiberScheduler.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…