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

Support React Native New Architecture #2792

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

CHOIMINSEOK
Copy link

@CHOIMINSEOK CHOIMINSEOK commented Jan 4, 2025

@kmsbernard and I have updated react-native-code-push to support the new architecture of React Native. We believe the best way to deploy these updates is through this main repository, and we are submitting this pull request to synchronize the following changes with the upstream master branch. Please let us know if you are open to new contributions. We are also committed to maintaining this code going forward.

Changes included in this pull request:

1. Support for the new architecture on Android and iOS

  • Android:
    • The CodePush implementation relies on React Native’s internals. In the new architecture, the JsBundleLoader is managed by ReactHostDelegate. Replace the JsBundleLoader in ReactHostDelegate using reflection when new architecture is on. Most of the relevant changes can be found in this commit.
    • When using the new architecture on Android, ReactHost is instantiated with ReactNativeHost via the getDefaultReactHost helper function. This could result in redundant CodePush instances during a CodePush restart. To address this, we have provided guidance to initialize PackageList only once during the application’s lifetime. 41f0e1b
  • iOS:
    • No additional changes are required for the new architecture on iOS.

2. Fix for E2E test scripts to support the new architecture

  • update test template app version to 0.76.5

@CHOIMINSEOK CHOIMINSEOK requested a review from a team as a code owner January 4, 2025 15:36
@CHOIMINSEOK
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants