Skip to content

Commit 688e18c

Browse files
rn-tester > Use code-generated Turbo Module name constants (facebook#38297)
Summary: Pull Request resolved: facebook#38297 Continuation of facebook#38295 Changelog: [Internal] [Changed] - Use code-generated Turbo Module name constants Reviewed By: shwanton Differential Revision: D47376344 fbshipit-source-id: 83d38df83789bdab17a3c772c7aad6db6891859e
1 parent f396067 commit 688e18c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/rn-tester/RNTester/AppDelegate.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ - (void)loadSourceForBridge:(RCTBridge *)bridge
7171
return std::make_shared<facebook::react::SampleTurboCxxModule>(jsInvoker);
7272
}
7373
#ifdef RCT_NEW_ARCH_ENABLED
74-
if (name == std::string([@"NativeCxxModuleExampleCxx" UTF8String])) {
74+
if (name == facebook::react::NativeCxxModuleExample::kModuleName) {
7575
return std::make_shared<facebook::react::NativeCxxModuleExample>(jsInvoker);
7676
}
7777
#endif

packages/rn-tester/android/app/src/main/jni/OnLoad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void registerComponents(
3333
std::shared_ptr<TurboModule> cxxModuleProvider(
3434
const std::string &name,
3535
const std::shared_ptr<CallInvoker> &jsInvoker) {
36-
if (name == "NativeCxxModuleExampleCxx") {
36+
if (name == NativeCxxModuleExample::kModuleName) {
3737
return std::make_shared<NativeCxxModuleExample>(jsInvoker);
3838
}
3939
return nullptr;

0 commit comments

Comments
 (0)