Warn when fabric is used without concurrent root (#41072)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41072

As part of the new architecture rollout, we want to simplify our set of supported configurations. Right now it is possible to use Fabric / new architecture without using concurrent root, which prevents us from bringing the new concurrent capabilities to these applications and holds back React renderer code.

Changelog: [Deprecated] Using the new architecture without concurrent root will soon not be supported.

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50425540

fbshipit-source-id: 1ec4c8202074e6ea98178f1a07311fda35b1951b
This commit is contained in:
Pieter De Baets
2023-10-19 06:17:50 -07:00
committed by Facebook GitHub Bot
parent 0b8fd748ee
commit c06807154b
2 changed files with 6 additions and 1 deletions
@@ -22,7 +22,6 @@ const reactDevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
type Props = $ReadOnly<{|
children?: React.Node,
fabric?: boolean,
useConcurrentRoot?: boolean,
rootTag: number | RootTag,
initialProps?: {...},
showArchitectureIndicator?: boolean,
@@ -83,6 +83,12 @@ export default function renderApplication<Props: Object>(
);
}
if (fabric && !useConcurrentRoot) {
console.warn(
'Using Fabric without concurrent root is deprecated. Please enable concurrent root for this application.',
);
}
performanceLogger.startTimespan('renderApplication_React_render');
performanceLogger.setExtra(
'usedReactConcurrentRoot',