-
Notifications
You must be signed in to change notification settings - Fork 4
feat: React Native New Architecture Support #58
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for React Native's New Architecture (Fabric and TurboModules) while maintaining backward compatibility with the legacy architecture. The implementation introduces TurboModule specs, platform-specific conditional compilation, and updates the Android example app to the latest React Native version.
- Implements TurboModule interface for React Native New Architecture support
- Updates iOS and Android platform code with conditional compilation for architecture detection
- Modernizes the example app to React Native 0.74.5 with new architecture support
Reviewed Changes
Copilot reviewed 37 out of 62 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/NativeExperimentReactNativeClient.ts | TurboModule interface specification for the new architecture |
package.json | Updates dependencies and adds codegen configuration for new architecture |
ios/ExperimentReactNativeClient.swift | Adds conditional imports and extension for new architecture |
ios/ExperimentReactNativeClient.mm | Bridge module implementation with new architecture support |
ios/ExperimentReactNativeClient.m | Removed legacy bridge module implementation |
experiment-react-native-client.podspec | Updates iOS platform requirements and dependencies for new architecture |
example/ | Comprehensive update of Android example app to React Native 0.74.5 with new architecture support |
android/ | Refactors Android implementation with separate modules for old/new architecture |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shared Android native code implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New arch Android implementation. To conform to the generated spec interface. Redirect call to shared impl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old arch Android implementation. Old interface. Redirect call to shared impl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conform implementation to the new spec interface if new arch enabled (through env var). Renaming to use cpp as React needs libs in cpp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conforms to new arch if enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec interface for JS on react native side. Also used to generate native code interfaces that native code would implement. File has to begin with Native*.ts
to be picked up by codegen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgraded RN to 0.74, async storage to 2.0.0.
Added codegen config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use spec and turbo module.
Supports RN new architecture.
Updated Android example app.