Skip to content

Commit 2f6dfed

Browse files
committed
Remove references to Deletion flag
We no longer use the Deletion flag anywhere in the new fork, so we can stop marking it.
1 parent 2a646f7 commit 2f6dfed

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

packages/react-reconciler/src/ReactChildFiber.new.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ import type {Fiber} from './ReactInternalTypes';
1313
import type {Lanes} from './ReactFiberLane.new';
1414

1515
import getComponentName from 'shared/getComponentName';
16-
import {
17-
Deletion,
18-
ChildDeletion,
19-
Placement,
20-
StaticMask,
21-
} from './ReactFiberFlags';
16+
import {Placement, ChildDeletion} from './ReactFiberFlags';
2217
import {
2318
getIteratorFn,
2419
REACT_ELEMENT_TYPE,
@@ -280,7 +275,6 @@ function ChildReconciler(shouldTrackSideEffects) {
280275
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
281276
}
282277
childToDelete.nextEffect = null;
283-
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;
284278

285279
const deletions = returnFiber.deletions;
286280
if (deletions === null) {

packages/react-reconciler/src/ReactFiberBeginWork.new.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ import {
6767
DidCapture,
6868
Update,
6969
Ref,
70-
Deletion,
7170
ChildDeletion,
7271
ForceUpdateForLegacySuspense,
7372
StaticMask,
@@ -2200,8 +2199,6 @@ function updateSuspensePrimaryChildren(
22002199
if (currentFallbackChildFragment !== null) {
22012200
// Delete the fallback child fragment
22022201
currentFallbackChildFragment.nextEffect = null;
2203-
currentFallbackChildFragment.flags =
2204-
(currentFallbackChildFragment.flags & StaticMask) | Deletion;
22052202
workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
22062203
const deletions = workInProgress.deletions;
22072204
if (deletions === null) {
@@ -3191,7 +3188,6 @@ function remountFiber(
31913188
returnFiber.firstEffect = returnFiber.lastEffect = current;
31923189
}
31933190
current.nextEffect = null;
3194-
current.flags = (current.flags & StaticMask) | Deletion;
31953191

31963192
const deletions = returnFiber.deletions;
31973193
if (deletions === null) {

packages/react-reconciler/src/ReactFiberHydrationContext.new.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ import {
2424
HostRoot,
2525
SuspenseComponent,
2626
} from './ReactWorkTags';
27-
import {
28-
Deletion,
29-
ChildDeletion,
30-
Placement,
31-
Hydrating,
32-
StaticMask,
33-
} from './ReactFiberFlags';
27+
import {ChildDeletion, Placement, Hydrating} from './ReactFiberFlags';
3428
import invariant from 'shared/invariant';
3529

3630
import {
@@ -130,7 +124,6 @@ function deleteHydratableInstance(
130124
const childToDelete = createFiberFromHostInstanceForDeletion();
131125
childToDelete.stateNode = instance;
132126
childToDelete.return = returnFiber;
133-
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;
134127

135128
// This might seem like it belongs on progressedFirstDeletion. However,
136129
// these children are not part of the reconciliation list of children.

0 commit comments

Comments
 (0)