Pass concurrentRoot flag through to renderApplication

Summary:
Changelog: [internal]

Pass concurrentRoot flag to renderApplication.

Reviewed By: rubennorte

Differential Revision: D28630516

fbshipit-source-id: 959b9c684a8736a28a86d42699a78c96da859224
This commit is contained in:
Samuel Susla
2021-06-11 04:23:50 -07:00
committed by Facebook GitHub Bot
parent 8fa8934011
commit 2a6df5b375
3 changed files with 9 additions and 2 deletions
+1
View File
@@ -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,
+1
View File
@@ -128,6 +128,7 @@ const AppRegistry = {
appKey === 'LogBox',
appKey,
coerceDisplayMode(displayMode),
appParameters.concurrentRoot,
);
},
};
+7 -2
View File
@@ -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);
@@ -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);
}