Skip to content

Commit

Permalink
Wrap primary tree in Offscreen fiber type
Browse files Browse the repository at this point in the history
Still just acts like a fragment. Next step is to move the hide/unhide
logic to the Offscreen implementation.
  • Loading branch information
acdlite committed Apr 25, 2020
1 parent ed01fda commit cb48f97
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-reconciler/src/ReactFiberBeginWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ import {
resolveLazyComponentTag,
createFiberFromTypeAndProps,
createFiberFromFragment,
createFiberFromOffscreen,
createWorkInProgress,
isSimpleFunctionComponent,
} from './ReactFiber.new';
Expand Down Expand Up @@ -1995,7 +1996,7 @@ function mountSuspensePrimaryChildren(
renderExpirationTime,
) {
const mode = workInProgress.mode;
const primaryChildFragment = createFiberFromFragment(
const primaryChildFragment = createFiberFromOffscreen(
primaryChildren,
mode,
renderExpirationTime,
Expand Down Expand Up @@ -2041,7 +2042,7 @@ function mountSuspenseFallbackChildren(
null,
);
} else {
primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
primaryChildFragment = createFiberFromOffscreen(null, mode, NoWork, null);
fallbackChildFragment = createFiberFromFragment(
fallbackChildren,
mode,
Expand Down Expand Up @@ -2202,7 +2203,7 @@ function mountSuspenseFallbackAfterRetryWithoutHydrating(
renderExpirationTime,
) {
const mode = workInProgress.mode;
const primaryChildFragment = createFiberFromFragment(
const primaryChildFragment = createFiberFromOffscreen(
null,
mode,
NoWork,
Expand Down

0 comments on commit cb48f97

Please sign in to comment.