GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Placement bit without removing others (#20398) · react/react@1377e46

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-reconciler/src
    • ReactChildFiber.new.js
    • ReactChildFiber.old.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.new.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,15 @@ function ChildReconciler(shouldTrackSideEffects) {
342342
const oldIndex = current.index;
343343
if (oldIndex < lastPlacedIndex) {
344344
// This is a move.
345-
newFiber.flags = Placement;
345+
newFiber.flags |= Placement;
346346
return lastPlacedIndex;
347347
} else {
348348
// This item can stay in place.
349349
return oldIndex;
350350
}
351351
} else {
352352
// This is an insertion.
353-
newFiber.flags = Placement;
353+
newFiber.flags |= Placement;
354354
return lastPlacedIndex;
355355
}
356356
}
@@ -359,7 +359,7 @@ function ChildReconciler(shouldTrackSideEffects) {
359359
// This is simpler for the single child case. We only need to do a
360360
// placement for inserting new children.
361361
if (shouldTrackSideEffects && newFiber.alternate === null) {
362-
newFiber.flags = Placement;
362+
newFiber.flags |= Placement;
363363
}
364364
return newFiber;
365365
}
Collapse file

‎packages/react-reconciler/src/ReactChildFiber.old.js‎

Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactChildFiber.old.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,15 @@ function ChildReconciler(shouldTrackSideEffects) {
342342
const oldIndex = current.index;
343343
if (oldIndex < lastPlacedIndex) {
344344
// This is a move.
345-
newFiber.flags = Placement;
345+
newFiber.flags |= Placement;
346346
return lastPlacedIndex;
347347
} else {
348348
// This item can stay in place.
349349
return oldIndex;
350350
}
351351
} else {
352352
// This is an insertion.
353-
newFiber.flags = Placement;
353+
newFiber.flags |= Placement;
354354
return lastPlacedIndex;
355355
}
356356
}
@@ -359,7 +359,7 @@ function ChildReconciler(shouldTrackSideEffects) {
359359
// This is simpler for the single child case. We only need to do a
360360
// placement for inserting new children.
361361
if (shouldTrackSideEffects && newFiber.alternate === null) {
362-
newFiber.flags = Placement;
362+
newFiber.flags |= Placement;
363363
}
364364
return newFiber;
365365
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.