diff --git a/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h b/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h index a95285b9216d97..8a1c6a9352fd4f 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/core/ConcreteShadowNode.h @@ -105,6 +105,16 @@ class ConcreteShadowNode : public BaseShadowNodeT { return static_cast(*props_); } + /* + * Returns a concrete props object associated with the node, as a shared_ptr. + * Thread-safe after the node is sealed. + */ + const std::shared_ptr& getConcretePropsShared() const { + react_native_assert( + BaseShadowNodeT::props_ && "Props must not be `nullptr`."); + return std::static_pointer_cast(props_); + } + /* * Returns a concrete event emitter object associated with the node. * Thread-safe after the node is sealed.