From 2a6df5b375f93b803db761de0c27370b58e36dea Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Fri, 11 Jun 2021 04:22:28 -0700 Subject: [PATCH] Pass concurrentRoot flag through to renderApplication Summary: Changelog: [internal] Pass concurrentRoot flag to renderApplication. Reviewed By: rubennorte Differential Revision: D28630516 fbshipit-source-id: 959b9c684a8736a28a86d42699a78c96da859224 --- Libraries/ReactNative/AppContainer.js | 1 + Libraries/ReactNative/AppRegistry.js | 1 + Libraries/ReactNative/renderApplication.js | 9 +++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Libraries/ReactNative/AppContainer.js b/Libraries/ReactNative/AppContainer.js index 2024b4cee44..23da450a310 100644 --- a/Libraries/ReactNative/AppContainer.js +++ b/Libraries/ReactNative/AppContainer.js @@ -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, diff --git a/Libraries/ReactNative/AppRegistry.js b/Libraries/ReactNative/AppRegistry.js index 0bb8a8658f7..65de45fb809 100644 --- a/Libraries/ReactNative/AppRegistry.js +++ b/Libraries/ReactNative/AppRegistry.js @@ -128,6 +128,7 @@ const AppRegistry = { appKey === 'LogBox', appKey, coerceDisplayMode(displayMode), + appParameters.concurrentRoot, ); }, }; diff --git a/Libraries/ReactNative/renderApplication.js b/Libraries/ReactNative/renderApplication.js index 5278769cd3f..72933a59ef6 100644 --- a/Libraries/ReactNative/renderApplication.js +++ b/Libraries/ReactNative/renderApplication.js @@ -32,6 +32,7 @@ function renderApplication( 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( 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); }