diff --git a/ReactCommon/fabric/components/view/ViewProps.cpp b/ReactCommon/fabric/components/view/ViewProps.cpp index 13b8f995b21..be9e8db543a 100644 --- a/ReactCommon/fabric/components/view/ViewProps.cpp +++ b/ReactCommon/fabric/components/view/ViewProps.cpp @@ -19,8 +19,7 @@ namespace facebook { namespace react { ViewProps::ViewProps(ViewProps const &sourceProps, RawProps const &rawProps) - : Props(sourceProps, rawProps), - YogaStylableProps(sourceProps, rawProps), + : YogaStylableProps(sourceProps, rawProps), AccessibilityProps(sourceProps, rawProps), opacity( convertRawProp(rawProps, "opacity", sourceProps.opacity, (Float)1.0)), diff --git a/ReactCommon/fabric/components/view/ViewProps.h b/ReactCommon/fabric/components/view/ViewProps.h index 6319f556138..a14a3610ae0 100644 --- a/ReactCommon/fabric/components/view/ViewProps.h +++ b/ReactCommon/fabric/components/view/ViewProps.h @@ -23,9 +23,7 @@ class ViewProps; using SharedViewProps = std::shared_ptr; -class ViewProps : public Props, - public YogaStylableProps, - public AccessibilityProps { +class ViewProps : public YogaStylableProps, public AccessibilityProps { public: ViewProps() = default; ViewProps(ViewProps const &sourceProps, RawProps const &rawProps); diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index c64caf9ff1d..47f1d942259 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -36,7 +36,7 @@ YogaLayoutableShadowNode::YogaLayoutableShadowNode( yogaNode_(&initializeYogaConfig(yogaConfig_)) { yogaNode_.setContext(this); - setProps(dynamic_cast(*fragment.props)); + setProps(static_cast(*fragment.props)); setChildren(YogaLayoutableShadowNode::getYogaLayoutableChildren()); } diff --git a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp index 859b4057f1e..08da2474757 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp @@ -22,7 +22,8 @@ namespace react { YogaStylableProps::YogaStylableProps( YogaStylableProps const &sourceProps, RawProps const &rawProps) - : yogaStyle(convertRawProp(rawProps, sourceProps.yogaStyle)){}; + : Props(sourceProps, rawProps), + yogaStyle(convertRawProp(rawProps, sourceProps.yogaStyle)){}; #pragma mark - DebugStringConvertible diff --git a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h index e93d1381895..d45b23713aa 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h +++ b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h @@ -15,7 +15,7 @@ namespace facebook { namespace react { -class YogaStylableProps { +class YogaStylableProps : public Props { public: YogaStylableProps() = default; YogaStylableProps(