diff --git a/ReactCommon/fabric/core/propsConversions.h b/ReactCommon/fabric/core/propsConversions.h index bf2f96f6c..0c259129d 100644 --- a/ReactCommon/fabric/core/propsConversions.h +++ b/ReactCommon/fabric/core/propsConversions.h @@ -24,6 +24,16 @@ inline void fromDynamic(const folly::dynamic &value, int &result) { } inline void fromDynamic(const folly::dynamic &value, std::string &result) { result = value.getString(); } +template +inline void fromDynamic(const folly::dynamic &value, std::vector &result) { + result.clear(); + T itemResult; + for (auto &itemValue : value) { + fromDynamic(itemValue, itemResult); + result.push_back(itemResult); + } +} + template inline T convertRawProp( const RawProps &rawProps,