Skip to content

Commit

Permalink
Null out deletions array instead of splicing 🤡
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jul 8, 2020
1 parent 7e879f9 commit 41cb193
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -2198,6 +2198,9 @@ function commitMutationEffects(
) {
if (fiber.deletions !== null) {
commitMutationEffectsDeletions(fiber.deletions, root, renderPriorityLevel);

// TODO (effects) Don't clear this yet; we may need to cleanup passive effects
fiber.deletions = null;
}

if (fiber.child !== null) {
Expand Down Expand Up @@ -2330,9 +2333,6 @@ function commitMutationEffectsDeletions(
}
// Don't clear the Deletion effect yet; we also use it to know when we need to detach refs later.
}

// TODO (effects) Don't clear this yet; we may need to cleanup passive effects
deletions.splice(0);
}

function commitLayoutEffects(
Expand Down

0 comments on commit 41cb193

Please sign in to comment.