dillon1000/react

Commit

[Partial Hydration] Dispatching events should not work until hydration commits (#16532)

* Refactor a bit to use less property access

* Add test for invoking an event before mount

* Add Hydration effect tag

This is equivalent to a "Placement" effect in that it's a new insertion
to the tree but it doesn't need an actual mutation.

It is only used to determine if a subtree has actually mounted yet.

* Use the Hydration flag for Roots

Previous roots had a Placement flag on them as a hack for this case but
since we have a special flag for it now, we can just use that.

* Add Flare test
Browse files
Changed paths8 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js ModifiedM packages/react-dom/src/__tests__/ReactServerRenderingHydration-test.js ModifiedM packages/react-dom/src/client/ReactDOMComponentTree.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.js ModifiedM packages/react-reconciler/src/ReactFiberCompleteWork.js ModifiedM packages/react-reconciler/src/ReactFiberTreeReflection.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/shared/ReactSideEffectTags.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…