dillon1000/react
Commit
Browse files Bugfix: Legacy Mode + DevTools "force fallback" (#19164)
DevTools has a feature to force a Suspense boundary to show a fallback. This feature causes us to skip the first render pass (where we render the primary children) and go straight to rendering the fallback. There's a Legacy Mode-only codepath that failed to take this scenario into account, instead assuming that whenever a fallback is being rendered, it was preceded by an attempt to render the primary children. SuspenseList can also cause us to skip the first pass, but the relevant branch is Legacy Mode-only, and SuspenseList is not supported in Legacy Mode. Fixes a test that I had temporarily disabled when upstreaming the Lanes implementation in #19108.
Changed paths4 files
First-parent comparisonpackages/react-devtools-shared/src/__tests__/__snapshots__/store-test.js.snap ModifiedM packages/react-devtools-shared/src/__tests__/store-test.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.old.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…