Skip to content

Commit 9b67547

Browse files
javachefacebook-github-bot
authored andcommitted
Remove enableArchitectureIndicator from AppRegistry API (facebook#45025)
Summary: Pull Request resolved: facebook#45025 This API just passed through the `enableArchitectureIndicator` prop to a custom WrapperComponent, as there is no default consumer of it. Instead, each provider of a custom WrapperComponent can capture the required value of itself. Changelog: [General][Removed] Removed enableArchitectureIndicator API which is only used internally. Reviewed By: cortinico Differential Revision: D58723922 fbshipit-source-id: 0c52a904424382f33caab92ac50b316ae161f877
1 parent 927815b commit 9b67547

File tree

6 files changed

+2
-22
lines changed

6 files changed

+2
-22
lines changed

packages/react-native/Libraries/ReactNative/AppContainer-dev.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ const AppContainer = ({
9090
internal_excludeInspector = false,
9191
internal_excludeLogBox = false,
9292
rootTag,
93-
showArchitectureIndicator,
9493
WrapperComponent,
9594
rootViewStyle,
9695
}: Props): React.Node => {
@@ -150,10 +149,7 @@ const AppContainer = ({
150149

151150
if (WrapperComponent != null) {
152151
innerView = (
153-
<WrapperComponent
154-
initialProps={initialProps}
155-
fabric={fabric === true}
156-
showArchitectureIndicator={showArchitectureIndicator === true}>
152+
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
157153
{innerView}
158154
</WrapperComponent>
159155
);

packages/react-native/Libraries/ReactNative/AppContainer-prod.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,14 @@ const AppContainer = ({
2121
fabric,
2222
initialProps,
2323
rootTag,
24-
showArchitectureIndicator,
2524
WrapperComponent,
2625
rootViewStyle,
2726
}: Props): React.Node => {
2827
let innerView = children;
2928

3029
if (WrapperComponent != null) {
3130
innerView = (
32-
<WrapperComponent
33-
initialProps={initialProps}
34-
fabric={fabric === true}
35-
showArchitectureIndicator={showArchitectureIndicator === true}>
31+
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
3632
{innerView}
3733
</WrapperComponent>
3834
);

packages/react-native/Libraries/ReactNative/AppContainer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export type Props = $ReadOnly<{|
1818
fabric?: boolean,
1919
rootTag: number | RootTag,
2020
initialProps?: {...},
21-
showArchitectureIndicator?: boolean,
2221
WrapperComponent?: ?React.ComponentType<any>,
2322
rootViewStyle?: ?ViewStyleProp,
2423
internal_excludeLogBox?: boolean,

packages/react-native/Libraries/ReactNative/AppRegistry.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
7373

7474
let wrapperComponentProvider: ?WrapperComponentProvider;
7575
let rootViewStyleProvider: ?RootViewStyleProvider;
76-
let showArchitectureIndicator = false;
7776

7877
/**
7978
* `AppRegistry` is the JavaScript entry point to running all React Native apps.
@@ -89,10 +88,6 @@ const AppRegistry = {
8988
rootViewStyleProvider = provider;
9089
},
9190

92-
enableArchitectureIndicator(enabled: boolean): void {
93-
showArchitectureIndicator = enabled;
94-
},
95-
9691
registerConfig(config: Array<AppConfig>): void {
9792
config.forEach(appConfig => {
9893
if (appConfig.run) {
@@ -139,7 +134,6 @@ const AppRegistry = {
139134
wrapperComponentProvider && wrapperComponentProvider(appParameters),
140135
rootViewStyleProvider && rootViewStyleProvider(appParameters),
141136
appParameters.fabric,
142-
showArchitectureIndicator,
143137
scopedPerformanceLogger,
144138
appKey === 'LogBox', // is logbox
145139
appKey,

packages/react-native/Libraries/ReactNative/renderApplication.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default function renderApplication<Props: Object>(
3535
WrapperComponent?: ?React.ComponentType<any>,
3636
rootViewStyle?: ?ViewStyleProp,
3737
fabric?: boolean,
38-
showArchitectureIndicator?: boolean,
3938
scopedPerformanceLogger?: IPerformanceLogger,
4039
isLogBox?: boolean,
4140
debugName?: string,
@@ -52,7 +51,6 @@ export default function renderApplication<Props: Object>(
5251
<AppContainer
5352
rootTag={rootTag}
5453
fabric={fabric}
55-
showArchitectureIndicator={showArchitectureIndicator}
5654
WrapperComponent={WrapperComponent}
5755
rootViewStyle={rootViewStyle}
5856
initialProps={initialProps ?? Object.freeze({})}

packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6561,7 +6561,6 @@ exports[`public API should not change unintentionally Libraries/ReactNative/AppC
65616561
fabric?: boolean,
65626562
rootTag: number | RootTag,
65636563
initialProps?: { ... },
6564-
showArchitectureIndicator?: boolean,
65656564
WrapperComponent?: ?React.ComponentType<any>,
65666565
rootViewStyle?: ?ViewStyleProp,
65676566
internal_excludeLogBox?: boolean,
@@ -6633,7 +6632,6 @@ export type RootViewStyleProvider = (appParameters: Object) => ViewStyleProp;
66336632
declare const AppRegistry: {
66346633
setWrapperComponentProvider(provider: WrapperComponentProvider): void,
66356634
setRootViewStyleProvider(provider: RootViewStyleProvider): void,
6636-
enableArchitectureIndicator(enabled: boolean): void,
66376635
registerConfig(config: Array<AppConfig>): void,
66386636
registerComponent(
66396637
appKey: string,
@@ -6973,7 +6971,6 @@ exports[`public API should not change unintentionally Libraries/ReactNative/rend
69736971
WrapperComponent?: ?React.ComponentType<any>,
69746972
rootViewStyle?: ?ViewStyleProp,
69756973
fabric?: boolean,
6976-
showArchitectureIndicator?: boolean,
69776974
scopedPerformanceLogger?: IPerformanceLogger,
69786975
isLogBox?: boolean,
69796976
debugName?: string,

0 commit comments

Comments
 (0)