(
returnFiber: Fiber,
currentFirstChild: Fiber | null,
)
| 442 | } |
| 443 | |
| 444 | function deleteRemainingChildren( |
| 445 | returnFiber: Fiber, |
| 446 | currentFirstChild: Fiber | null, |
| 447 | ): null { |
| 448 | if (!shouldTrackSideEffects) { |
| 449 | // Noop. |
| 450 | return null; |
| 451 | } |
| 452 | |
| 453 | // TODO: For the shouldClone case, this could be micro-optimized a bit by |
| 454 | // assuming that after the first child we've already added everything. |
| 455 | let childToDelete = currentFirstChild; |
| 456 | while (childToDelete !== null) { |
| 457 | deleteChild(returnFiber, childToDelete); |
| 458 | childToDelete = childToDelete.sibling; |
| 459 | } |
| 460 | return null; |
| 461 | } |
| 462 | |
| 463 | function mapRemainingChildren( |
| 464 | currentFirstChild: Fiber, |
no test coverage detected