Skip to content

Linking a "local library" #13275

Closed Answered by acoates-ms
adam-p asked this question in Q&A
May 27, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

In ReactPackageProvider.cpp, the 2nd argument to AddAttributedModules, specifies that you want to register those modules as TurboModules, not NativeModules.

You could try changing that to false.

Alternatively, instead of moving the code backwards (to be a nativemodule instead of a turbomodule) you could go ahead and make the JS code use TurboModuleRegistry.get('AwesomeModule') instead of NativeModules.AwesomeModule. That JS code will work if the module is a NativeModule or a TurboModule, so should work on windows as a TurboModule and continue to work on the other platforms where you are using NativeModules.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adam-p
Comment options

Answer selected by adam-p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants