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

New arch migration #495

Merged
merged 8 commits into from
Feb 1, 2024
Merged

New arch migration #495

merged 8 commits into from
Feb 1, 2024

Conversation

troZee
Copy link
Member

@troZee troZee commented Jan 31, 2024

Summary

This PR aims to add a turbo module with backward compatibility. Re.Pack current implementation directly uses RN native modules, but with this change, there is a SPEC implementation that allows for more efficient communication between native and JavaScript. This change allows for both old and new architecture. All implementation follows the official react native bob builder template.

Test plan

  • Make sure you are currently using the newArch and the setup conforms to React Native Doc directives which also means you're on RN>=0.68.0

NOTE: TesterApp currently meets this requirement if you're using repack TesterApp.

For Android

  • You will only need to update your android/gradle.properties file as follows:
    newArchEnabled=true

  • and then yarn TesterApp:start

For iOS

  • Run pod install with the flags:
    RCT_NEW_ARCH_ENABLED=1 pod install

  • and then yarn TesterApp:start

Copy link

changeset-bot bot commented Jan 31, 2024

🦋 Changeset detected

Latest commit: 985d6e5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@callstack/repack Major
testerapp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Left few questions

@jbroma jbroma changed the base branch from main to v4 February 1, 2024 16:05
@jbroma jbroma force-pushed the troZee/new-arch-migration branch from c8b0e46 to 985d6e5 Compare February 1, 2024 17:57
Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff, thanks @troZee 🎉

@jbroma jbroma merged commit a669fd9 into v4 Feb 1, 2024
3 checks passed
@jbroma jbroma deleted the troZee/new-arch-migration branch February 1, 2024 18:02
jbroma added a commit that referenced this pull request Feb 29, 2024
* TS spec + android old arch

* android new arch

* ios support

* fix tests

* change needsEagerInit to true

* add early return

* fix comment

* chore: add changeset

---------

Co-authored-by: Piotr Trocki <[email protected]>
Co-authored-by: Jakub Romanczyk <[email protected]>
jbroma added a commit that referenced this pull request Apr 5, 2024
* TS spec + android old arch

* android new arch

* ios support

* fix tests

* change needsEagerInit to true

* add early return

* fix comment

* chore: add changeset

---------

Co-authored-by: Piotr Trocki <[email protected]>
Co-authored-by: Jakub Romanczyk <[email protected]>
jbroma added a commit that referenced this pull request Apr 5, 2024
* TS spec + android old arch

* android new arch

* ios support

* fix tests

* change needsEagerInit to true

* add early return

* fix comment

* chore: add changeset

---------

Co-authored-by: Piotr Trocki <[email protected]>
Co-authored-by: Jakub Romanczyk <[email protected]>
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.

5 participants