Skip to content

refactor: drop backward compatible templates #712

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

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

satya164
Copy link
Member

@satya164 satya164 commented Dec 3, 2024

As of React Native 0.76, the new architecture is now default. So this moves the templates with new architecture up. New libraries should start with new arch template.

For legacy usage, we still have the legacy template for now. Old architecture libraries still work in new architecture via compat layer. So the backward compatible templates are unnecessary. They are also difficult to maintain and are currently broken, so I'm removing them.

@satya164 satya164 force-pushed the @satya164/backward-compatible branch 4 times, most recently from ba4a91c to 7dba6b5 Compare December 3, 2024 17:11
As of React Native 0.76, the new architecture is now default.
So this moves the templates with new architecture up.
New libraries should start with new arch template.

For legacy usage, we still have the legacy template for now.
Old architecture libraries still work in new architecture via compat layer.
So the backward compatible templates are unnecessary.
They are also difficult to maintain and are currently broken, so I'm removing them.
@satya164 satya164 force-pushed the @satya164/backward-compatible branch from 7dba6b5 to cd6fd65 Compare December 4, 2024 11:59
@satya164 satya164 merged commit 34b1f80 into main Dec 4, 2024
18 of 19 checks passed
@satya164 satya164 deleted the @satya164/backward-compatible branch December 4, 2024 12:04
@maitrungduc1410
Copy link

hi @satya164 just want to confirm, library generated using create-react-native-library@latest should work in app with newArc and legacy right?

@satya164
Copy link
Member Author

@maitrungduc1410 the latest templates only support the new architecture. you will need to use an older version to generate project for old architecture (0.49.8 for legacy templates and 0.44.3 for backward compatible templates).

react native docs also say you can support old architecture on Android by using includesGeneratedCode but I haven't tested that. references:

https://reactnative.dev/docs/the-new-architecture/codegen-cli#enabling-includesgeneratedcode
https://callstack.github.io/react-native-builder-bob/build#codegen

@maitrungduc1410
Copy link

Got it, thanks

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