Skip to content

Add Legacy Component to RNTester with Interop Layer#36360

Closed
cipolleschi wants to merge 2 commits into
facebook:mainfrom
cipolleschi:export-D43735699
Closed

Add Legacy Component to RNTester with Interop Layer#36360
cipolleschi wants to merge 2 commits into
facebook:mainfrom
cipolleschi:export-D43735699

Conversation

@cipolleschi
Copy link
Copy Markdown
Contributor

Summary:
This change is the iOS equivalent of D43731219 (ab55e12), but only for what concerns the RNTester example as the interop layer was already present in the codebase and exposed to the OSS.

Changelog

[internal] - Add example on how to consume a Legacy component in Fabric with the interop layer

Reviewed By: cortinico

Differential Revision: D43735699

… in the interop layer (facebook#36335)

Summary:
Pull Request resolved: facebook#36335

This change depends on [this PR](react-native-community/cli#1849) of the CLI that introduces the `unstable_reactLegacyComponent` field in the `react-native.config.js` file.

This change introduce a JS script that reads that fields and generated a method in an object to return a list of components to be registered. The `RCTAppDelegate` has been updated to read those components and to automatically register them into the interop layer.

Notice that a user can just update the `react-native.config.js` and rebuild the app to integrate these changes, there is no need to reinstall the pods.

The idea behind this logic is to let the user know which components they are using with the interop layer, rather than rely on some black magic that could leave them blind to the need of actually migrate their apps.

## Changelog:
[iOS][Changed] - Implement mechanism to register legacy components in the iOS Fabric interop layer

Differential Revision: https://internalfb.com/D43665973

fbshipit-source-id: 22ef2ec769afad76624797e07c8e5bed28011449
Summary:
This change is the iOS equivalent of D43731219 (facebook@ab55e12), but only for what concerns the RNTester example as the interop layer was already present in the codebase and exposed to the OSS.

## Changelog
[internal] - Add example on how to consume a Legacy component in Fabric with the interop layer

Reviewed By: cortinico

Differential Revision: D43735699

fbshipit-source-id: e6d91ea4b3f3882629341ed6986c2e76148e47eb
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Mar 3, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43735699

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2023

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against 1f79162

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,508,872 -3
android hermes armeabi-v7a 7,822,848 +2
android hermes x86 8,986,447 -12
android hermes x86_64 8,842,620 -9
android jsc arm64-v8a 9,135,684 -4
android jsc armeabi-v7a 8,325,234 -2
android jsc x86 9,188,637 +1
android jsc x86_64 9,447,629 +3

Base commit: ec99ba1
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 3, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 4d7753e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants