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

feat: Use BaseReactPackage instead of TurboReactPackage #558

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

mrousavy
Copy link
Contributor

@mrousavy mrousavy commented Dec 3, 2024

This is required for RN 0.77 apparently. TurboReactPackage is deprecated on new arch. No idea why.

I am not sure about backwards compatibility either, sorry.

Feel free to close this PR if this isn't backwards compatible.

Summary

Test Plan

This is required for RN 0.77 apparently. TurboReactPackage is deprecated on new arch. No idea why.

I am not sure about backwards compatibility either, sorry.

Feel free to close this PR if this isn't backwards compatible.
@leonhh
Copy link

leonhh commented Dec 3, 2024

TurboReactPackage will be restored and available for RN 0.77: reactwg/react-native-releases#652

@mrousavy
Copy link
Contributor Author

mrousavy commented Dec 3, 2024

Interesting.

@janicduplessis
Copy link
Collaborator

Looks like it was introduced in 0.74 (facebook/react-native@7a31ecd). It is restored, but still marked as deprecated so I assume it will just be removed later. TBH I am not sure what other popular libraries use as a backwards compatibility target (@mrousavy what about you).

@mrousavy
Copy link
Contributor Author

mrousavy commented Dec 3, 2024

For Nitro it's easy - I just use BaseReactPackage because it only works on RN 0.75+ anyways.

I think all my packages are gonna be BaseReactPackage - backwards compatibility is really annoying to work with 😅

@janicduplessis
Copy link
Collaborator

I think I will do a major with 0.74+ compat

@janicduplessis janicduplessis merged commit 018f7de into AppAndFlow:main Dec 3, 2024
2 checks passed
@vonovak
Copy link
Contributor

vonovak commented Dec 13, 2024

@janicduplessis FYI while TurboReactPackage has been deprecated for a while now, the community cli didn't support it until yesterday; there's a good chance you'll see bug reports because of this change from people who don't run the latest cli.

react-native-community/cli#2563

@janicduplessis
Copy link
Collaborator

I have this comment to make cli detect it. I haven’t seen more reports about it so I think it works https://github.com/th3rdwave/react-native-safe-area-context/blob/29d12106ea19180b6c898812796b14c703090b61/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaContextPackage.kt#L12

@vonovak
Copy link
Contributor

vonovak commented Dec 13, 2024

Aah, nice trick 😄 👍 (I missed it)

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.

4 participants