Valentin Shergin edc6cb5711 Fabric: New, much fancier, approach to parse dynamic props
Summary:
The new approach uses C++ overloading feature instead of specifying exact types in macros manually.
*Almost* macro-free!

Reviewed By: mdvacca

Differential Revision: D7738584

fbshipit-source-id: 85f8e4c1037b452df5e73b093dced9392cb2f73e
2018-04-26 18:03:07 -07:00

28 lines
549 B
C++

/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "Props.h"
#include <fabric/core/propsConversions.h>
#include <folly/dynamic.h>
namespace facebook {
namespace react {
void Props::apply(const RawProps &rawProps) {
ensureUnsealed();
applyRawProp(rawProps, "nativeID", nativeId_);
}
const std::string &Props::getNativeId() const {
return nativeId_;
}
} // namespace react
} // namespace facebook