dillon1000/react

Commit

[Bugfix] Don't hide/unhide unless visibility changes (#21875)

* Use Visibility flag to schedule a hide/show effect

Instead of the Update flag, which is also used for other side-effects,
like refs.

I originally added the Visibility flag for this purpose in #20043 but
it got reverted last winter when we were bisecting the effects refactor.

* Added failing test case

Co-authored-by: Brian Vaughn <[email protected]>
Browse files
Changed paths6 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberCommitWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberCompleteWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberCompleteWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberFlags.js ModifiedA packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemanticsDOM-test.js Added
Patch

Files changed

Rendering syntax-highlighted changes…