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 24, 2020
1 parent 60fdc6f commit b0e18cd
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 @@ -2052,7 +2053,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 @@ -2208,7 +2209,7 @@ function mountSuspenseFallbackAfterRetryWithoutHydrating(
renderExpirationTime,
) {
const mode = workInProgress.mode;
const primaryChildFragment = createFiberFromFragment(
const primaryChildFragment = createFiberFromOffscreen(
null,
mode,
NoWork,
Expand Down

0 comments on commit b0e18cd

Please sign in to comment.