dillon1000/react
Commit
Browse files Make LegacyHidden match semantics of old fork (#18998)
Facebook currently relies on being able to hydrate hidden HTML. So skipping those trees is a regression. We don't have a proper solution for this in the new API yet. So I'm reverting it to match the old behavior. Now the server renderer will treat LegacyHidden the same as a fragment, with no other special behavior. We can only get away with this because we assume that every instance of LegacyHidden is accompanied by a host component wrapper. In the hidden mode, the host component is given a `hidden` attribute, which ensures that the initial HTML is not visible. To support the use of LegacyHidden as a true fragment, without an extra DOM node, we will have to hide the initial HTML in some other way.
Changed paths4 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js ModifiedM packages/react-dom/src/server/ReactPartialRenderer.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.new.js ModifiedM scripts/jest/TestFlags.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…