Skip to content

Commit 0603455

Browse files
Remove SampleTurboCxxModule example (#52442)
Summary: Pull Request resolved: #52442 Changelog: [Internal] The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore. Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps: https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules It is not included in any RNTester app at this time Reviewed By: cortinico Differential Revision: D77771111 fbshipit-source-id: a4fe1d13fd0224babc46f54b921a036f7b237a48
1 parent 298ec6c commit 0603455

File tree

6 files changed

+2
-337
lines changed

6 files changed

+2
-337
lines changed

packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.cpp

Lines changed: 0 additions & 151 deletions
This file was deleted.

packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/NativeSampleTurboCxxModuleSpecJSI.h

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Refer to packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.h for a concrete example.
2+
See: https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.cpp

Lines changed: 0 additions & 96 deletions
This file was deleted.

packages/react-native/ReactCommon/react/nativemodule/samples/ReactCommon/SampleTurboCxxModule.h

Lines changed: 0 additions & 43 deletions
This file was deleted.

packages/rn-tester/RNTester/AppDelegate.mm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#import <React/RCTLinkingManager.h>
1515
#import <ReactCommon/RCTSampleTurboModule.h>
1616
#import <ReactCommon/RCTTurboModuleManager.h>
17-
#import <ReactCommon/SampleTurboCxxModule.h>
1817

1918
#import <React/RCTPushNotificationManager.h>
2019

@@ -83,10 +82,6 @@ - (BOOL)application:(UIApplication *)app
8382
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
8483
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
8584
{
86-
if (name == std::string([@"SampleTurboCxxModule" UTF8String])) {
87-
return std::make_shared<facebook::react::SampleTurboCxxModule>(jsInvoker);
88-
}
89-
9085
if (name == facebook::react::NativeCxxModuleExample::kModuleName) {
9186
return std::make_shared<facebook::react::NativeCxxModuleExample>(jsInvoker);
9287
}

0 commit comments

Comments
 (0)