mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove enableArchitectureIndicator from AppRegistry API (#45025)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
1 parent
927815b9f6
commit
9b67547bec
6 files changed
+2
-22
No files matched your search
@@ -90,7 +90,6 @@ const AppContainer = ({
|
||||
internal_excludeInspector = false,
|
||||
internal_excludeLogBox = false,
|
||||
rootTag,
|
||||
showArchitectureIndicator,
|
||||
WrapperComponent,
|
||||
rootViewStyle,
|
||||
}: Props): React.Node => {
|
||||
@@ -150,10 +149,7 @@ const AppContainer = ({
|
||||
|
||||
if (WrapperComponent != null) {
|
||||
innerView = (
|
||||
<WrapperComponent
|
||||
initialProps={initialProps}
|
||||
fabric={fabric === true}
|
||||
showArchitectureIndicator={showArchitectureIndicator === true}>
|
||||
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
|
||||
{innerView}
|
||||
</WrapperComponent>
|
||||
);
|
||||
|
||||
@@ -21,7 +21,6 @@ const AppContainer = ({
|
||||
fabric,
|
||||
initialProps,
|
||||
rootTag,
|
||||
showArchitectureIndicator,
|
||||
WrapperComponent,
|
||||
rootViewStyle,
|
||||
}: Props): React.Node => {
|
||||
@@ -29,10 +28,7 @@ const AppContainer = ({
|
||||
|
||||
if (WrapperComponent != null) {
|
||||
innerView = (
|
||||
<WrapperComponent
|
||||
initialProps={initialProps}
|
||||
fabric={fabric === true}
|
||||
showArchitectureIndicator={showArchitectureIndicator === true}>
|
||||
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
|
||||
{innerView}
|
||||
</WrapperComponent>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,6 @@ export type Props = $ReadOnly<{|
|
||||
fabric?: boolean,
|
||||
rootTag: number | RootTag,
|
||||
initialProps?: {...},
|
||||
showArchitectureIndicator?: boolean,
|
||||
WrapperComponent?: ?React.ComponentType<any>,
|
||||
rootViewStyle?: ?ViewStyleProp,
|
||||
internal_excludeLogBox?: boolean,
|
||||
|
||||
@@ -73,7 +73,6 @@ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
|
||||
|
||||
let wrapperComponentProvider: ?WrapperComponentProvider;
|
||||
let rootViewStyleProvider: ?RootViewStyleProvider;
|
||||
let showArchitectureIndicator = false;
|
||||
|
||||
/**
|
||||
* `AppRegistry` is the JavaScript entry point to running all React Native apps.
|
||||
@@ -89,10 +88,6 @@ const AppRegistry = {
|
||||
rootViewStyleProvider = provider;
|
||||
},
|
||||
|
||||
enableArchitectureIndicator(enabled: boolean): void {
|
||||
showArchitectureIndicator = enabled;
|
||||
},
|
||||
|
||||
registerConfig(config: Array<AppConfig>): void {
|
||||
config.forEach(appConfig => {
|
||||
if (appConfig.run) {
|
||||
@@ -139,7 +134,6 @@ const AppRegistry = {
|
||||
wrapperComponentProvider && wrapperComponentProvider(appParameters),
|
||||
rootViewStyleProvider && rootViewStyleProvider(appParameters),
|
||||
appParameters.fabric,
|
||||
showArchitectureIndicator,
|
||||
scopedPerformanceLogger,
|
||||
appKey === 'LogBox', // is logbox
|
||||
appKey,
|
||||
|
||||
@@ -35,7 +35,6 @@ export default function renderApplication<Props: Object>(
|
||||
WrapperComponent?: ?React.ComponentType<any>,
|
||||
rootViewStyle?: ?ViewStyleProp,
|
||||
fabric?: boolean,
|
||||
showArchitectureIndicator?: boolean,
|
||||
scopedPerformanceLogger?: IPerformanceLogger,
|
||||
isLogBox?: boolean,
|
||||
debugName?: string,
|
||||
@@ -52,7 +51,6 @@ export default function renderApplication<Props: Object>(
|
||||
<AppContainer
|
||||
rootTag={rootTag}
|
||||
fabric={fabric}
|
||||
showArchitectureIndicator={showArchitectureIndicator}
|
||||
WrapperComponent={WrapperComponent}
|
||||
rootViewStyle={rootViewStyle}
|
||||
initialProps={initialProps ?? Object.freeze({})}
|
||||
|
||||
@@ -6561,7 +6561,6 @@ exports[`public API should not change unintentionally Libraries/ReactNative/AppC
|
||||
fabric?: boolean,
|
||||
rootTag: number | RootTag,
|
||||
initialProps?: { ... },
|
||||
showArchitectureIndicator?: boolean,
|
||||
WrapperComponent?: ?React.ComponentType<any>,
|
||||
rootViewStyle?: ?ViewStyleProp,
|
||||
internal_excludeLogBox?: boolean,
|
||||
@@ -6633,7 +6632,6 @@ export type RootViewStyleProvider = (appParameters: Object) => ViewStyleProp;
|
||||
declare const AppRegistry: {
|
||||
setWrapperComponentProvider(provider: WrapperComponentProvider): void,
|
||||
setRootViewStyleProvider(provider: RootViewStyleProvider): void,
|
||||
enableArchitectureIndicator(enabled: boolean): void,
|
||||
registerConfig(config: Array<AppConfig>): void,
|
||||
registerComponent(
|
||||
appKey: string,
|
||||
@@ -6973,7 +6971,6 @@ exports[`public API should not change unintentionally Libraries/ReactNative/rend
|
||||
WrapperComponent?: ?React.ComponentType<any>,
|
||||
rootViewStyle?: ?ViewStyleProp,
|
||||
fabric?: boolean,
|
||||
showArchitectureIndicator?: boolean,
|
||||
scopedPerformanceLogger?: IPerformanceLogger,
|
||||
isLogBox?: boolean,
|
||||
debugName?: string,
|
||||
|
||||
Reference in new issue
Block a user