Skip to content

Commit

Permalink
Remove references to Deletion flag
Browse files Browse the repository at this point in the history
We no longer use the Deletion flag anywhere in the new fork, so we can
stop marking it.
  • Loading branch information
acdlite committed Jan 19, 2021
1 parent 2a646f7 commit 2f6dfed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
8 changes: 1 addition & 7 deletions packages/react-reconciler/src/ReactChildFiber.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import type {Fiber} from './ReactInternalTypes';
import type {Lanes} from './ReactFiberLane.new';

import getComponentName from 'shared/getComponentName';
import {
Deletion,
ChildDeletion,
Placement,
StaticMask,
} from './ReactFiberFlags';
import {Placement, ChildDeletion} from './ReactFiberFlags';
import {
getIteratorFn,
REACT_ELEMENT_TYPE,
Expand Down Expand Up @@ -280,7 +275,6 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
}
childToDelete.nextEffect = null;
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;

const deletions = returnFiber.deletions;
if (deletions === null) {
Expand Down
4 changes: 0 additions & 4 deletions packages/react-reconciler/src/ReactFiberBeginWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import {
DidCapture,
Update,
Ref,
Deletion,
ChildDeletion,
ForceUpdateForLegacySuspense,
StaticMask,
Expand Down Expand Up @@ -2200,8 +2199,6 @@ function updateSuspensePrimaryChildren(
if (currentFallbackChildFragment !== null) {
// Delete the fallback child fragment
currentFallbackChildFragment.nextEffect = null;
currentFallbackChildFragment.flags =
(currentFallbackChildFragment.flags & StaticMask) | Deletion;
workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
const deletions = workInProgress.deletions;
if (deletions === null) {
Expand Down Expand Up @@ -3191,7 +3188,6 @@ function remountFiber(
returnFiber.firstEffect = returnFiber.lastEffect = current;
}
current.nextEffect = null;
current.flags = (current.flags & StaticMask) | Deletion;

const deletions = returnFiber.deletions;
if (deletions === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ import {
HostRoot,
SuspenseComponent,
} from './ReactWorkTags';
import {
Deletion,
ChildDeletion,
Placement,
Hydrating,
StaticMask,
} from './ReactFiberFlags';
import {ChildDeletion, Placement, Hydrating} from './ReactFiberFlags';
import invariant from 'shared/invariant';

import {
Expand Down Expand Up @@ -130,7 +124,6 @@ function deleteHydratableInstance(
const childToDelete = createFiberFromHostInstanceForDeletion();
childToDelete.stateNode = instance;
childToDelete.return = returnFiber;
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;

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

0 comments on commit 2f6dfed

Please sign in to comment.