dillon1000/react

Commit

[Fiber] only remove properties from singletons on release (#37112)

Removing attributes does not actually reset all property state on the
singleton instance. It also has the side effect of wiping any 3rd party
set attributes and properties that 3rd party scripts and extensions.

Reimplements the singleton release to clear properties on the instance
based on the last committed props for the singleton fiber.

Notably there is an unfixed path with preamble contribution markers that
still just clears based on attributes which covers SSR'd attributes that
need to be wiped before client recovery on hydration can continue. There
are gated failing tests for this as a TODO.
Browse files
Changed paths5 files
First-parent comparison
M packages/react-dom-bindings/src/client/ReactDOMComponent.js ModifiedM packages/react-dom-bindings/src/client/ReactDOMComponentTree.js ModifiedM packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-dom/src/__tests__/ReactDOMSingletonComponents-test.js ModifiedM packages/react-reconciler/src/ReactFiberCommitHostEffects.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…