RefreshControl does not work correctly on state change
See original GitHub issueReact Native version: 0.59.8
Steps To Reproduce
- Pull down on list, refresh control appears (as it should)
- Press button on top of list to load data, refresh control does not appear even though refreshing is true. You can also this is true by pressing the button first, the pulling down, then finally pressing the button again.
Describe what you expected to happen: The refresh control should appear whenever refreshing
is true
Snack, code example, or link to a repository: https://snack.expo.io/ByZXxOuhV
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:23
Top Results From Across the Web
Pull to Refresh and setState not working - React Native
onRefresh called the function "refreshcontrol()" see code below. I need to change my state "refreshing" to true before I fetch from my API....
Read more >RefreshControl - React Native
This component is used inside a ScrollView or ListView to add pull to refresh functionality. When the ScrollView is at scrollY: 0 ,...
Read more >Pull To Refresh And Setstate Not Working React Native
Attempting to change the refresh control while it is not idle is strongly discouraged and probably won't work properly. I'm honestly surprised this...
Read more >React Native Tutorial 32 - RefreshControl - YouTube
Welcome to this course on React Native, React Native is used hybrid mobile app development. Facebook's React Native user interface (UI) ...
Read more >React Native Pull-to-Refresh: Make Refreshing Easy for Users
While using RefreshControl, you'll need to handle the state of the component. The refreshing prop indicates whether the refresh is active or not ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
still an issue on v0.62.2 when
<RefreshControl />
is enabled (with local state) from auseEffect
function.If anyone is still having problems with this:
I found a workaround that is just enabling the bounce.
I had bounces={false} and after removing it, it’s working on iOS now(Android was already working)
But in my case, the loading didn’t appear not even once.