@rnx-kit/react-native-host 0.4.11 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,10 @@
48
48
 
49
49
  #endif // __has_include(<React/RCTAppSetupUtils.h>)
50
50
 
51
+ #if __has_include(<react/nativemodule/defaults/DefaultTurboModules.h>) // >= 0.75
52
+ #import <react/nativemodule/defaults/DefaultTurboModules.h>
53
+ #endif
54
+
51
55
  #endif // USE_FABRIC
52
56
 
53
57
  @implementation RNXTurboModuleAdapter {
@@ -89,7 +93,11 @@
89
93
  getTurboModule:(std::string const &)name
90
94
  jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
91
95
  {
96
+ #if __has_include(<react/nativemodule/defaults/DefaultTurboModules.h>) // >= 0.75
97
+ return facebook::react::DefaultTurboModules::getTurboModule(name, jsInvoker);
98
+ #else
92
99
  return nullptr;
100
+ #endif // __has_include(<react/nativemodule/defaults/DefaultTurboModules.h>)
93
101
  }
94
102
 
95
103
  - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnx-kit/react-native-host",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "Simplify React Native initialization",
5
5
  "homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/react-native-host#readme",
6
6
  "license": "MIT",