Skip to content

Commit 1447731

Browse files
chore: remove deprecated react legacy components from config (#2554)
1 parent 7207ef0 commit 1447731

File tree

7 files changed

+3
-66
lines changed

7 files changed

+3
-66
lines changed

docs/projects.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,10 @@ multiple `Podfile` files in your project.
9393

9494
Array of strings that will be passed to the `npx react-native run-ios` command when running in watch mode.
9595

96-
#### project.ios.unstable_reactLegacyComponentNames
97-
98-
> [!CAUTION]
99-
> Deprecated in React Native 0.74, where this behavior is detected automatically and this config does nothing. You can safely remove it from your project.
100-
101-
Please note that this is part of the **Unstable Fabric Interop Layer**, and might be subject to breaking change in the future,
102-
hence the `unstable_` prefix.
103-
104-
An array with a list of Legacy Component Name that you want to be registered with the Fabric Interop Layer.
105-
This will allow you to use libraries that haven't been migrated yet on the New Architecture.
106-
107-
The list should contain the name of the components, as they're registered in the ViewManagers (i.e. just `"Button"`).
108-
109-
Since React Native 0.74, this property is ignored as the Interop Layer is **Automatic**, you don't need to register the Legacy Components anymore and they will be discovered automatically.
110-
11196
#### project.ios.automaticPodsInstallation
11297

11398
A boolean value to determine if you want to automatically install CocoaPods when running `run-ios` or `build-ios` command when:
99+
114100
- they are not yet installed
115101
- a new dependency visible for autolinking is installed
116102
- a version of existing native dependency has changed
@@ -147,21 +133,6 @@ See [`dependency.platforms.android.configuration`](dependencies.md#platformsandr
147133

148134
Array of strings that will be passed to the `npx react-native run-android` command when running in watch mode.
149135

150-
#### project.android.unstable_reactLegacyComponentNames
151-
152-
> [!CAUTION]
153-
> Deprecated in React Native 0.74, where this behavior is detected automatically and this config does nothing. You can safely remove it from your project.
154-
155-
Please note that this is part of the **Unstable Fabric Interop Layer**, and might be subject to breaking change in the future,
156-
hence the `unstable_` prefix.
157-
158-
An array with a list of Legacy Component Name that you want to be registered with the Fabric Interop Layer.
159-
This will allow you to use libraries that haven't been migrated yet on the New Architecture.
160-
161-
The list should contain the name of the components, as they're registered in the ViewManagers (i.e. just `"Button"`).
162-
163-
Since React Native 0.74, this property is ignored as the Interop Layer is **Automatic**, you don't need to register the Legacy Components anymore and they will be discovered automatically.
164-
165136
### project.android.assets
166137

167138
Array of folder paths that will be passed to the `npx react-native link-assets` command to specify the assets to be linked to Android project.

packages/cli-config-android/src/config/__tests__/__snapshots__/getProjectConfig.test.ts.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Object {
99
"mainActivity": ".MainActivity",
1010
"packageName": "com.some.example",
1111
"sourceDir": "/flat/android",
12-
"unstable_reactLegacyComponentNames": undefined,
1312
"watchModeCommandParams": undefined,
1413
}
1514
`;
@@ -23,7 +22,6 @@ Object {
2322
"mainActivity": ".MainActivity",
2423
"packageName": "com.some.example",
2524
"sourceDir": "/multiple/android",
26-
"unstable_reactLegacyComponentNames": undefined,
2725
"watchModeCommandParams": undefined,
2826
}
2927
`;
@@ -37,7 +35,6 @@ Object {
3735
"mainActivity": ".MainActivity",
3836
"packageName": "com.some.example",
3937
"sourceDir": "/nested/android",
40-
"unstable_reactLegacyComponentNames": undefined,
4138
"watchModeCommandParams": undefined,
4239
}
4340
`;

packages/cli-config-android/src/config/index.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
import {findLibraryName} from './findLibraryName';
2525
import {findComponentDescriptors} from './findComponentDescriptors';
2626
import {findBuildGradle} from './findBuildGradle';
27-
import {CLIError, logger} from '@react-native-community/cli-tools';
27+
import {CLIError} from '@react-native-community/cli-tools';
2828
import getMainActivity from './getMainActivity';
2929

3030
/**
@@ -68,13 +68,6 @@ export function projectConfig(
6868
: packageName;
6969
const mainActivity = getMainActivity(manifestPath || '') ?? '';
7070

71-
// @todo remove for RN 0.75
72-
if (userConfig.unstable_reactLegacyComponentNames) {
73-
logger.warn(
74-
'The "project.android.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.',
75-
);
76-
}
77-
7871
return {
7972
sourceDir,
8073
appName,
@@ -83,8 +76,6 @@ export function projectConfig(
8376
mainActivity,
8477
dependencyConfiguration: userConfig.dependencyConfiguration,
8578
watchModeCommandParams: userConfig.watchModeCommandParams,
86-
// @todo remove for RN 0.75
87-
unstable_reactLegacyComponentNames: undefined,
8879
assets: userConfig.assets ?? [],
8980
};
9081
}

packages/cli-config-apple/src/config/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
IOSProjectConfig,
1919
IOSDependencyConfig,
2020
} from '@react-native-community/cli-types';
21-
import {CLIError, logger} from '@react-native-community/cli-tools';
21+
import {CLIError} from '@react-native-community/cli-tools';
2222
import {BuilderCommand} from '../types';
2323

2424
/**
@@ -47,13 +47,6 @@ export const getProjectConfig =
4747

4848
const xcodeProject = findXcodeProject(fs.readdirSync(sourceDir));
4949

50-
// @ts-ignore @todo remove for RN 0.75
51-
if (userConfig.unstable_reactLegacyComponentNames) {
52-
logger.warn(
53-
'The "project.ios.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.',
54-
);
55-
}
56-
5750
return {
5851
sourceDir,
5952
watchModeCommandParams: userConfig.watchModeCommandParams,

packages/cli-config/src/schema.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ export const projectConfig = t
155155
.object({
156156
sourceDir: t.string(),
157157
watchModeCommandParams: t.array().items(t.string()),
158-
// @todo remove for RN 0.75
159-
unstable_reactLegacyComponentNames: t
160-
.array()
161-
.items(t.string())
162-
.optional(),
163158
automaticPodsInstallation: t.bool().default(false),
164159
assets: t.array().items(t.string()).default([]),
165160
})
@@ -173,11 +168,6 @@ export const projectConfig = t
173168
packageName: t.string(),
174169
dependencyConfiguration: t.string(),
175170
watchModeCommandParams: t.array().items(t.string()),
176-
// @todo remove for RN 0.75
177-
unstable_reactLegacyComponentNames: t
178-
.array()
179-
.items(t.string())
180-
.optional(),
181171
assets: t.array().items(t.string()).default([]),
182172
})
183173
.default({}),

packages/cli-platform-android/src/commands/runAndroid/__tests__/tryLaunchAppOnDevice.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ let androidProject: AndroidProjectConfig = {
2727
mainActivity: '.MainActivity',
2828
dependencyConfiguration: undefined,
2929
watchModeCommandParams: undefined,
30-
unstable_reactLegacyComponentNames: undefined,
3130
};
3231

3332
const shellStartCommand = ['shell', 'am', 'start'];

packages/cli-types/src/android.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export interface AndroidProjectConfig {
66
mainActivity: string;
77
dependencyConfiguration?: string;
88
watchModeCommandParams?: string[];
9-
// @todo remove for RN 0.75
10-
unstable_reactLegacyComponentNames?: string[] | null;
119
assets: string[];
1210
}
1311

@@ -18,8 +16,6 @@ export type AndroidProjectParams = {
1816
packageName?: string;
1917
dependencyConfiguration?: string;
2018
watchModeCommandParams?: string[];
21-
// @todo remove for RN 0.75
22-
unstable_reactLegacyComponentNames?: string[] | null;
2319
assets?: string[];
2420
};
2521

0 commit comments

Comments
 (0)