Skip to content

Commit

Permalink
rn-tester > Use code-generated Turbo Module name constants
Browse files Browse the repository at this point in the history
Summary:
Continuation of facebook#38295

Changelog:
[Internal] [Changed] - Use code-generated Turbo Module name constants

Differential Revision: D47376344

fbshipit-source-id: 9edd650257cbf38070ee2493320b4941d07dc1d0
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Jul 11, 2023
1 parent 62cbc97 commit 5882a93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rn-tester/RNTester/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ - (void)loadSourceForBridge:(RCTBridge *)bridge
return std::make_shared<facebook::react::SampleTurboCxxModule>(jsInvoker);
}
#ifdef RCT_NEW_ARCH_ENABLED
if (name == std::string([@"NativeCxxModuleExampleCxx" UTF8String])) {
if (name == NativeCxxModuleExample::kModuleName) {
return std::make_shared<facebook::react::NativeCxxModuleExample>(jsInvoker);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/android/app/src/main/jni/OnLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void registerComponents(
std::shared_ptr<TurboModule> cxxModuleProvider(
const std::string &name,
const std::shared_ptr<CallInvoker> &jsInvoker) {
if (name == "NativeCxxModuleExampleCxx") {
if (name == NativeCxxModuleExample::kModuleName) {
return std::make_shared<NativeCxxModuleExample>(jsInvoker);
}
return nullptr;
Expand Down

0 comments on commit 5882a93

Please sign in to comment.