Skip to content

Commit 7addf44

Browse files
committed
Fix: Use getOffscreenContainerProps
The type of these props is different per renderer. An oversight from facebook#21960. Unfortunately wasn't caught by Flow because fiber props are `any`-typed.
1 parent f87c6e1 commit 7addf44

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/react-reconciler/src/ReactFiberBeginWork.new.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,10 +2376,10 @@ function updateSuspenseFallbackChildren(
23762376
const isHidden = true;
23772377
const currentOffscreenContainer = currentPrimaryChildFragment.child;
23782378
const offscreenContainer: Fiber = (primaryChildFragment.child: any);
2379-
const containerProps = {
2380-
hidden: isHidden,
2379+
const containerProps = getOffscreenContainerProps(
2380+
isHidden ? 'hidden' : 'visible',
23812381
primaryChildren,
2382-
};
2382+
);
23832383
offscreenContainer.pendingProps = containerProps;
23842384
offscreenContainer.memoizedProps = containerProps;
23852385
completeSuspendedOffscreenHostContainer(

packages/react-reconciler/src/ReactFiberBeginWork.old.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,10 +2376,10 @@ function updateSuspenseFallbackChildren(
23762376
const isHidden = true;
23772377
const currentOffscreenContainer = currentPrimaryChildFragment.child;
23782378
const offscreenContainer: Fiber = (primaryChildFragment.child: any);
2379-
const containerProps = {
2380-
hidden: isHidden,
2379+
const containerProps = getOffscreenContainerProps(
2380+
isHidden ? 'hidden' : 'visible',
23812381
primaryChildren,
2382-
};
2382+
);
23832383
offscreenContainer.pendingProps = containerProps;
23842384
offscreenContainer.memoizedProps = containerProps;
23852385
completeSuspendedOffscreenHostContainer(

0 commit comments

Comments
 (0)