mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
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:
committed by
Facebook Github Bot
parent
f01c4e2a14
commit
66492e7f9b
@@ -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,
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user