Fabric JS: allow showing fabric indicator for AppRegistry

Summary: AppRegistry always hides the small fabric indicator. This allows it to be enabled.

Reviewed By: mdvacca

Differential Revision: D14877831

fbshipit-source-id: 4fe3aac13074641049a9298f5a616aea3138ce93
This commit is contained in:
Kevin Gozali
2019-04-10 13:54:00 -07:00
committed by Facebook Github Bot
parent f01c4e2a14
commit 66492e7f9b

View File

@@ -60,6 +60,7 @@ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
) => component();
let wrapperComponentProvider: ?WrapperComponentProvider;
let showFabricIndicator = false;
/**
* `AppRegistry` is the JavaScript entry point to running all React Native apps.
@@ -71,6 +72,10 @@ const AppRegistry = {
wrapperComponentProvider = provider;
},
enableFabricIndicator(enabled: boolean): void {
showFabricIndicator = enabled;
},
registerConfig(config: Array<AppConfig>): void {
config.forEach(appConfig => {
if (appConfig.run) {
@@ -114,7 +119,7 @@ const AppRegistry = {
appParameters.rootTag,
wrapperComponentProvider && wrapperComponentProvider(appParameters),
appParameters.fabric,
false,
showFabricIndicator,
scopedPerformanceLogger,
);
},