Skip to content

Commit cf185ce

Browse files
rubennortefacebook-github-bot
authored andcommitted
Fix reported properties for native modules
Summary: Changelog: [internal] This fixes the reported keys for C++ TurboModules. Before, we were trying to read the properties from the method map in the public `TurboModule`, but in this implementation all the logic is actually in its delegate (also a `TurboModule` instance, yeah, confusing). This fixes the issue by forwarding the call to the delegate that has the right information. Differential Revision: D63761381
1 parent c430083 commit cf185ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-native-codegen/src/generators/modules/GenerateModuleH.js

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public:
8080
return delegate_.create(rt, propName);
8181
}
8282
83+
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
84+
return delegate_.getPropertyNames(runtime);
85+
}
86+
8387
static constexpr std::string_view kModuleName = "${moduleName}";
8488
8589
protected:

0 commit comments

Comments
 (0)