-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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: deprecate passing separate new arch flags to RCTRootViewFactory #46652
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.
Sadly, we can't merge this. If we do this, people will not be able to turn off selectively parts of the New Architecture, and we are not ready to remove this possibility just yet.
@cipolleschi Yeah, I was afraid its too early 😅 Do you think we can deprecate RCTRootViewFactory initializers? |
What do you mean? Do you want to move away from some initializers? |
@cipolleschi Yeah, I want to deprecate initializers that accept multiple flags Deprecate this: - (instancetype)initWithBundleURL:(NSURL *)bundleURL
newArchEnabled:(BOOL)newArchEnabled
turboModuleEnabled:(BOOL)turboModuleEnabled
bridgelessEnabled:(BOOL)bridgelessEnabled And make this preferred: - (instancetype)initWithBundleURL:(NSURL *)bundleURL
newArchEnabled:(BOOL)newArchEnabled So users that rely on setting different flags can still use it but for new (brownfield) integrations they can use newArchEnabled parameter. |
Yeah, that seems reasonable to me. |
a873d9f
to
688e923
Compare
688e923
to
4b4ae52
Compare
@cipolleschi I've deprecated the initializers |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi merged this pull request in 7e1674f. |
This pull request was successfully merged by @okwasniewski in 7e1674f When will my fix make it into a release? | How to file a pick request? |
Summary:
This PR follows up with the deprecation introduced here: #46228
The idea is to have new architecture depend on one flag, namely
newArchEnabled
. It exposes additional initializers for RCTRootViewFactory.Changelog:
[IOS] [CHANGED] - Use
newArchEnabled
flag in RCTAppDelegate and RCTRootViewFactoryTest Plan:
CI Green