mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Implement Android Cxx TurboModule support
Summary: ## Summary This diff does a bunch of things: 1. The TurboModule resolution algorithm on Android now supports C++ TurboModules. 2. `SampleTurboCxxModule` is moved from `ReactCommon/turbomodule/samples/platform/ios/` to `ReactCommon/turbomodule/samples` so that both iOS and Android can share it. 3. `CatalystTurboModuleManagerDelegate::getTurboModule(std::string, JSCallInvoker)` now understands and returns `SampleTurboCxxModule`. Reviewed By: mdvacca Differential Revision: D15253477 fbshipit-source-id: 3def91911b091f8cf93be17decd245a0499ed718
This commit is contained in:
committed by
Facebook Github Bot
parent
08d87cdacc
commit
e1102b43ff
+5
@@ -56,6 +56,11 @@ void TurboModuleManager::installJSIBindings() {
|
||||
}
|
||||
TurboModuleBinding::install(*runtime_, std::make_shared<TurboModuleBinding>(
|
||||
[this](const std::string &name) {
|
||||
auto cxxModule = turboModuleManagerDelegate_->cthis()->getTurboModule(name, jsCallInvoker_);
|
||||
if (cxxModule) {
|
||||
return cxxModule;
|
||||
}
|
||||
|
||||
const auto moduleInstance = getJavaModule(name);
|
||||
return turboModuleManagerDelegate_->cthis()->getTurboModule(name, moduleInstance, jsCallInvoker_);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user