diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index fdbc1310501..df38fa0a9b2 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -170,6 +170,10 @@ void YogaLayoutableShadowNode::layout(LayoutContext layoutContext) { void YogaLayoutableShadowNode::layoutChildren(LayoutContext layoutContext) { for (const auto &childYogaNode : yogaNode_.getChildren()) { + if (!childYogaNode->getHasNewLayout()) { + continue; + } + auto childNode = static_cast(childYogaNode->getContext()); diff --git a/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp b/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp index 13296abc4b8..b6220fe5389 100644 --- a/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp +++ b/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp @@ -22,12 +22,12 @@ LayoutMetrics LayoutableShadowNode::getLayoutMetrics() const { } bool LayoutableShadowNode::setLayoutMetrics(LayoutMetrics layoutMetrics) { + ensureUnsealed(); + if (layoutMetrics_ == layoutMetrics) { return false; } - ensureUnsealed(); - layoutMetrics_ = layoutMetrics; return true; }