Skip to content

Commit

Permalink
Warn when fabric is used without concurrent root (#41072)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
javache authored and facebook-github-bot committed Oct 19, 2023
1 parent 0b8fd74 commit c068071
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c068071

Please sign in to comment.