mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add module name constant to class for downstream use (#38295)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38295 Move constant to class instance so customers can use strongly typed name, feedback from D46159001 Changelog: [Internal] [Changed] - Add module name constant to codegen'd class for downstream use Reviewed By: christophpurrer Differential Revision: D47095993 fbshipit-source-id: 741d0d837bf912d6b32e5f12c5df871563d46686
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8e9062849e
commit
f396067cca
@@ -74,9 +74,11 @@ public:
|
||||
return delegate_.get(rt, propName);
|
||||
}
|
||||
|
||||
static constexpr std::string_view kModuleName = "${moduleName}";
|
||||
|
||||
protected:
|
||||
${hasteModuleName}CxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
||||
: TurboModule("${moduleName}", jsInvoker),
|
||||
: TurboModule(std::string{${hasteModuleName}CxxSpec::kModuleName}, jsInvoker),
|
||||
delegate_(static_cast<T*>(this), jsInvoker) {}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user