Provide defaults for TurboModuleManagerDelegate and JSIModulePackage#34418
Closed
cortinico wants to merge 1 commit into
Closed
Provide defaults for TurboModuleManagerDelegate and JSIModulePackage#34418cortinico wants to merge 1 commit into
cortinico wants to merge 1 commit into
Conversation
Contributor
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Base commit: d35aab4 |
Summary: This is an attempt to relax the need of specifying a custom `TurboModuleManagerDelegate` and a `JSIModulePackage` in new apps for New Architecture. Users can just specify the name of the dynamic library to load and they'll default to use the `DefaultTurboModuleManagerDelegate` and `DefaultJSIModulePackage`. Users will still have to provide a C++ implementation for it for the time being, but this at least removes one extra file that we requested them to create and maintain. If we're fine with this approach, I'll replicate it inside the default template. Changelog: [Android] [Added] - Provide defaults for TurboModuleManagerDelegate and JSIModulePackage Reviewed By: cipolleschi Differential Revision: D38701180 fbshipit-source-id: 68f2193a2a414bdde7c3b35081f7155a7983fa4a
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D38701180 |
6470e39 to
417d3eb
Compare
Base commit: d35aab4 |
Collaborator
|
This pull request was successfully merged by @cortinico in 9a2eb90. When will my fix make it into a release? | Upcoming Releases |
roryabraham
pushed a commit
to Expensify/react-native
that referenced
this pull request
Aug 17, 2022
…acebook#34418) Summary: Pull Request resolved: facebook#34418 This is an attempt to relax the need of specifying a custom `TurboModuleManagerDelegate` and a `JSIModulePackage` in new apps for New Architecture. Users can just specify the name of the dynamic library to load and they'll default to use the `DefaultTurboModuleManagerDelegate` and `DefaultJSIModulePackage`. Users will still have to provide a C++ implementation for it for the time being, but this at least removes one extra file that we requested them to create and maintain. If we're fine with this approach, I'll replicate it inside the default template. Changelog: [Android] [Added] - Provide defaults for TurboModuleManagerDelegate and JSIModulePackage Reviewed By: cipolleschi Differential Revision: D38701180 fbshipit-source-id: eec302c5789990700eb75353d97751358ca6799f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is an attempt to relax the need of specifying a custom TurboModuleManagerDelegate and a JSIModulePackage in new apps for New Architecture.
Users can just specify the name of the dynamic library to load and they'll default to use the DefaultTurboModuleManagerDelegate and DefaultJSIModulePackage.
Users will still have to provide a C++ implementation for it for the time being, but this at least removes one extra file that we requested them to create and maintain.
If we're fine with this approach, I'll replicate it inside the default template.
Changelog
[Android] [Added] - Provide defaults for TurboModuleManagerDelegate and JSIModulePackage
Test Plan
RN Tester works, given you
SoLoader.loadLibrary(BuildConfig.DYNAMIC_LIBRARY_NAME)inonCreateas otherwise the implementation forDefaultTurboModuleManagerDelegate.initHybridcan't be found.