dillon1000/react
Commit
Browse files subtreeFlag warning: Fix legacy suspense false positive (#21388)
Legacy Suspense is weird. We intentionally commit a suspended fiber in an inconsistent state. If the fiber suspended before it mounted any effects, then the fiber won't have a PassiveStatic effect flag, which will trigger the "missing expected subtreeFlag" warning. To avoid the false positive, we'd need to mark fibers that commit in an incomplete state, somehow. For now I'll disable the warning in legacy mode, with the assumption that most of the bugs that would trigger it are either exclusive to concurrent mode or exist in both.
Changed paths3 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberHooks.new.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.old.js ModifiedA packages/react-reconciler/src/__tests__/ReactSubtreeFlagsWarning-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…