diff --git a/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp b/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp index 610dae1e370..398e5e9af6f 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp @@ -3000,7 +3000,10 @@ static void calculateLayoutImpl( // positions on wrap-reverse. if (performLayout && node->style().flexWrap() == Wrap::WrapReverse) { for (auto child : node->getLayoutChildren()) { - if (child->style().positionType() != PositionType::Absolute) { + // Skip hidden children because their measured size is NaN, and their + // position must stay zeroed out + if (child->style().display() != Display::None && + child->style().positionType() != PositionType::Absolute) { child->setLayoutPosition( node->getLayout().measuredDimension(dimension(crossAxis)) - child->getLayout().position(flexStartEdge(crossAxis)) -