Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to Deletion flag #20623

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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