mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TurboModule Android: install SampleTurboModule and the playground to RNTester
Summary:
This compiles SampleTurboModule into RNTester Android. It also adds the NativeModule playground to show case TurboModule system to RNTester examples, just like in iOS.
{F337854369}
Changelog: [Android][TurboModule] Added TurboModule example to RNTester when `USE_CODEGEN` is set
Reviewed By: hramos
Differential Revision: D24004711
fbshipit-source-id: b682dd51fa998ee2e60f8d6ffd8c39220d13a7fe
This commit is contained in:
1 parent
b9a1ea9e9e
commit
94b198cfd5
8 files changed
+122
-16
No files matched your search
+9
@@ -196,5 +196,14 @@ NativeSampleTurboModuleSpecJSI::NativeSampleTurboModuleSpecJSI(
|
||||
0, __hostFunction_NativeSampleTurboModuleSpecJSI_getConstants};
|
||||
}
|
||||
|
||||
std::shared_ptr<TurboModule> SampleTurboModuleSpec_ModuleProvider(
|
||||
const std::string moduleName,
|
||||
const JavaTurboModule::InitParams ¶ms) {
|
||||
if (moduleName == "SampleTurboModule") {
|
||||
return std::make_shared<NativeSampleTurboModuleSpecJSI>(params);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
Reference in new issue
Block a user