From fc264400ecdfe580c0f7ab893bb0034235287a8c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 4 Mar 2025 10:04:36 -0800 Subject: [PATCH] Fix PullToRefresh props casting (#49815) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49815 The pull to refresh component props's casting is imprecise. This change uses the more precise type for the props. ## Changelog: [Internal] - cast props to `PullToRefreshViewProps` Reviewed By: sammy-SC Differential Revision: D70559080 fbshipit-source-id: c42d3d41a22683a3392813c2af25828781a68401 --- .../ScrollView/RCTPullToRefreshViewComponentView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 be611bf2c6b..1fcdd9a7a4b 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm @@ -72,7 +72,7 @@ using namespace facebook::react; { // Prop updates are ignored by _refreshControl until after the initial layout, so just store them in _props until then if (_isBeforeInitialLayout) { - _props = std::static_pointer_cast(props); + _props = std::static_pointer_cast(props); return; }