From 5882a93ed542879c86cf4d674d1bae9d3ac0c858 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Tue, 11 Jul 2023 12:45:14 -0700 Subject: [PATCH] rn-tester > Use code-generated Turbo Module name constants Summary: Continuation of https://github.com/facebook/react-native/pull/38295 Changelog: [Internal] [Changed] - Use code-generated Turbo Module name constants Differential Revision: D47376344 fbshipit-source-id: 9edd650257cbf38070ee2493320b4941d07dc1d0 --- packages/rn-tester/RNTester/AppDelegate.mm | 2 +- packages/rn-tester/android/app/src/main/jni/OnLoad.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rn-tester/RNTester/AppDelegate.mm b/packages/rn-tester/RNTester/AppDelegate.mm index f4e8d4006c5416..781a7b18a8db92 100644 --- a/packages/rn-tester/RNTester/AppDelegate.mm +++ b/packages/rn-tester/RNTester/AppDelegate.mm @@ -71,7 +71,7 @@ - (void)loadSourceForBridge:(RCTBridge *)bridge return std::make_shared(jsInvoker); } #ifdef RCT_NEW_ARCH_ENABLED - if (name == std::string([@"NativeCxxModuleExampleCxx" UTF8String])) { + if (name == NativeCxxModuleExample::kModuleName) { return std::make_shared(jsInvoker); } #endif diff --git a/packages/rn-tester/android/app/src/main/jni/OnLoad.cpp b/packages/rn-tester/android/app/src/main/jni/OnLoad.cpp index ae9238ab90dd2d..9bbc4c83311e6e 100644 --- a/packages/rn-tester/android/app/src/main/jni/OnLoad.cpp +++ b/packages/rn-tester/android/app/src/main/jni/OnLoad.cpp @@ -33,7 +33,7 @@ void registerComponents( std::shared_ptr cxxModuleProvider( const std::string &name, const std::shared_ptr &jsInvoker) { - if (name == "NativeCxxModuleExampleCxx") { + if (name == NativeCxxModuleExample::kModuleName) { return std::make_shared(jsInvoker); } return nullptr;