Files
react-native/packages
Riccardo Cipolleschi 21b93d8d7d 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
2025-07-15 10:47:34 -07:00
..