You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to have a property called isRefetching on my queries, that is true only when I've manually called refetch(). On my React Native infinite lists (using FlatList), I'd like to pass it to the refreshing prop.
I've tried passing isLoading, but that only shows the spinner on first load, when no data is cached. isFetching is a better option, but it also shows the spinner whenever it's automatically refetching, say when the component remounts. I'd like to only show the spinner when the refetch is triggered by calling tasksQuery.refetch()
Does the API already support such a calculation? Or would this hypothetical new isRefetching property make a good addition to the useQuery API? My workaround for now is to create my own isRefetching using useState, but I'm finding I need to do it in numerous places.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to have a property called
isRefetchingon my queries, that is true only when I've manually calledrefetch(). On my React Native infinite lists (using FlatList), I'd like to pass it to therefreshingprop.I've tried passing
isLoading, but that only shows the spinner on first load, when no data is cached.isFetchingis a better option, but it also shows the spinner whenever it's automatically refetching, say when the component remounts. I'd like to only show the spinner when the refetch is triggered by callingtasksQuery.refetch()Does the API already support such a calculation? Or would this hypothetical new
isRefetchingproperty make a good addition to theuseQueryAPI? My workaround for now is to create my ownisRefetchingusinguseState, but I'm finding I need to do it in numerous places.Beta Was this translation helpful? Give feedback.
All reactions