From 07353171cc8153218e8ada6345677884baecb05b Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel Date: Thu, 16 Jul 2026 16:03:44 +0200 Subject: [PATCH] fix(ios): reset EmptyLayoutMetrics on Fabric view recycle Value-init `{}` is not EmptyLayoutMetrics, so recycled display:none views could keep self.hidden=YES when reused for visible content. Co-authored-by: Cursor --- .../Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 5571b5350bff..d7ecf128231d 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -722,7 +722,7 @@ - (void)prepareForRecycle _isJSResponder = NO; _removeClippedSubviews = NO; _reactSubviews = [NSMutableArray new]; - _layoutMetrics = {}; + _layoutMetrics = EmptyLayoutMetrics; } - (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(NSSet *_Nullable)props