From 27217e8bd601757b5db6efc022db428b552a2aa4 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 12 Aug 2025 10:16:19 -0700 Subject: [PATCH] Initialize props for RCTPullToRefreshViewComponentView (#53231) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53231 The RCTPullToRefreshViewComponentView props are not initialized when the component view is created. this could lead to undefined behaviors and crashes. This change fixes it. ## Changelog: [iOS][Fixed] - Properly initialize the RCTPullToRefreshViewComponentView Reviewed By: sammy-SC Differential Revision: D80093141 fbshipit-source-id: dac98d56c749b9f5d85338279c8da2a7e5ddb4a3 --- .../ScrollView/RCTPullToRefreshViewComponentView.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm index a61f888f053..36338f61b29 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm @@ -40,6 +40,7 @@ using namespace facebook::react; // attaching and detaching of a pull-to-refresh view to a scroll view. // The pull-to-refresh view is not a subview of this view. self.hidden = YES; + _props = PullToRefreshViewShadowNode::defaultSharedProps(); _recycled = NO; [self _initializeUIRefreshControl]; }