Skip to content

Commit

Permalink
Pass concurrentRoot flag through to renderApplication
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

Pass concurrentRoot flag to renderApplication.

Reviewed By: rubennorte

Differential Revision: D28630516

fbshipit-source-id: 959b9c684a8736a28a86d42699a78c96da859224
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Jun 11, 2021
1 parent 8fa8934 commit 2a6df5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Libraries/ReactNative/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import * as React from 'react';
type Props = $ReadOnly<{|
children?: React.Node,
fabric?: boolean,
useConcurrentRoot?: boolean,
rootTag: number | RootTag,
initialProps?: {...},
showArchitectureIndicator?: boolean,
Expand Down
1 change: 1 addition & 0 deletions Libraries/ReactNative/AppRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const AppRegistry = {
appKey === 'LogBox',
appKey,
coerceDisplayMode(displayMode),
appParameters.concurrentRoot,
);
},
};
Expand Down
9 changes: 7 additions & 2 deletions Libraries/ReactNative/renderApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function renderApplication<Props: Object>(
isLogBox?: boolean,
debugName?: string,
displayMode?: ?DisplayModeType,
useConcurrentRoot?: boolean,
) {
invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);

Expand Down Expand Up @@ -64,9 +65,13 @@ function renderApplication<Props: Object>(

performanceLogger.startTimespan('renderApplication_React_render');
performanceLogger.setExtra('usedReactFabric', fabric ? '1' : '0');

if (fabric) {
require('../Renderer/shims/ReactFabric').render(renderable, rootTag);
require('../Renderer/shims/ReactFabric').render(
renderable,
rootTag,
null,
useConcurrentRoot,
);
} else {
require('../Renderer/shims/ReactNative').render(renderable, rootTag);
}
Expand Down

0 comments on commit 2a6df5b

Please sign in to comment.