Skip to content

Commit

Permalink
Drop changes to ScopeComponent in commitMutationEffectsOnFiber
Browse files Browse the repository at this point in the history
  • Loading branch information
yungsters committed Oct 30, 2024
1 parent 4036c91 commit 1b7c7ee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/react-reconciler/src/ReactFiberCommitWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -2078,12 +2078,10 @@ function commitMutationEffectsOnFiber(
// TODO: This is a temporary solution that allowed us to transition away
// from React Flare on www.
if (flags & Ref) {
if (!offscreenSubtreeWasHidden && current !== null) {
if (current !== null) {
safelyDetachRef(finishedWork, finishedWork.return);
}
if (!offscreenSubtreeIsHidden) {
safelyAttachRef(finishedWork, finishedWork.return);
}
safelyAttachRef(finishedWork, finishedWork.return);
}
if (flags & Update) {
const scopeInstance = finishedWork.stateNode;
Expand Down

0 comments on commit 1b7c7ee

Please sign in to comment.