Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the unstable_reactLegacyComponentNames to iOS project config #1859

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The following settings are available on iOS and Android:
```ts
type IOSProjectParams = {
sourceDir?: string;
unstable_reactLegacyComponentNames?: string[] | null;
};

type AndroidProjectParams = {
Expand All @@ -81,6 +82,18 @@ type AndroidProjectParams = {
A path to a directory where iOS source files are located. In most cases, you shouldn't need to set it, unless you have
multiple `Podfile` files in your project.

#### project.ios.unstable_reactLegacyComponentNames

> Note: Only applicable when new architecture is turned on.
Please note that this is part of the **Unstable Fabric Interop Layer**, and might be subject to breaking change in the future,
hence the `unstable_` prefix.

An array with a list of Legacy Component Name that you want to be registered with the Fabric Interop Layer.
This will allow you to use libraries that haven't been migrated yet on the New Architecture.

The list should contain the name of the components, as they're registered in the ViewManagers (i.e. just `"Button"`).

#### project.android.appName

A name of the app in the Android `sourceDir`, equivalent to Gradle project name. By default it's `app`.
Expand Down Expand Up @@ -109,7 +122,7 @@ Please note that this is part of the **Unstable Fabric Interop Layer**, and migh
hence the `unstable_` prefix.

An array with a list of Legacy Component Name that you want to be registered with the Fabric Interop Layer.
This will allow you to use on the New Architecture, libreries that are legacy and haven't been migrated yet.
This will allow you to use libraries that haven't been migrated yet on the New Architecture.

The list should contain the name of the components, as they're registered in the ViewManagers (i.e. just `"Button"`).

Expand Down
4 changes: 4 additions & 0 deletions packages/cli-config/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ export const projectConfig = t
// IOSProjectParams
.object({
sourceDir: t.string(),
unstable_reactLegacyComponentNames: t
.array()
.items(t.string())
.default([]),
})
.default({}),
android: t
Expand Down