Skip to content

Commit

Permalink
We can't reset Placement tags or we'll forget to insert them
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Jul 12, 2019
1 parent 73d6c0b commit 2a052b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-reconciler/src/ReactFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import type {ReactEventComponentInstance} from 'shared/ReactTypes';
import invariant from 'shared/invariant';
import warningWithoutStack from 'shared/warningWithoutStack';
import {enableProfilerTimer, enableFlareAPI} from 'shared/ReactFeatureFlags';
import {NoEffect} from 'shared/ReactSideEffectTags';
import {NoEffect, Placement} from 'shared/ReactSideEffectTags';
import {ConcurrentRoot, BatchedRoot} from 'shared/ReactRootTags';
import {
IndeterminateComponent,
Expand Down Expand Up @@ -494,8 +494,9 @@ export function resetWorkInProgress(
// We assume pendingProps, index, key, ref, return are still untouched to
// avoid doing another reconciliation.

// Reset the effect tag.
workInProgress.effectTag = NoEffect;
// Reset the effect tag but keep any Placement tags, since that's something
// that child fiber is setting, not the reconciliation.
workInProgress.effectTag &= Placement;

// The effect list is no longer valid.
workInProgress.nextEffect = null;
Expand Down

0 comments on commit 2a052b4

Please sign in to comment.