A framework for building native applications using React
Fix RefreshControl recycling (#52584)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52584 The method `_initializeUIRefreshControl` creates a new instance of `UIRefreshControl` which has the default values for things like tint color. However the props that we are keeping in the component are the `_props` before recycling. The actual state of the newly created UIRefreshControl is out of sync w.r.t the props the component thinks to have. By introducing a `_recycled` state variable, we can force the first `updateProp` call to apply all the props to the newly created component. ## Changelog: [iOS][Fixed] - Make sure that the recycled refresh control have the right props setup. Reviewed By: sammy-SC Differential Revision: D78278207 fbshipit-source-id: 4be20aa43f96eb87828b44a4deedd33a23d1d17f
R
Riccardo Cipolleschi committed
21b93d8d7d46a26f728df19764f85a8aebf318bb
Parent: 09daad2
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 7/15/2025, 5:47:34 PM