Skip to content

Commit eb4490e

Browse files
author
Nick
committed
Add comment for offscreen child tracking
1 parent 6b38ca2 commit eb4490e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-reconciler/src/ReactFiberCompleteWork.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ function appendAllChildrenToContainer(
342342
needsVisibilityToggle: boolean,
343343
isHidden: boolean,
344344
): boolean {
345+
// Host components that have their visibility toggled by an OffscreenComponent
346+
// do not support passChildrenWhenCloningPersistedNodes. To inform the callee
347+
// about their presence, we track and return if they were added to the
348+
// child set.
345349
let hasOffscreenComponentChild = false;
346350
if (supportsPersistence) {
347351
// We only have the top Fiber that was created but we need recurse down its

0 commit comments

Comments
 (0)