Replies: 4 comments
-
Anyone has ideas? |
Beta Was this translation helpful? Give feedback.
-
This issue of remembering previous pages after a |
Beta Was this translation helpful? Give feedback.
-
@skulegirl did you find a solution by chance? I am struggling as well with the same issue. |
Beta Was this translation helpful? Give feedback.
-
This solution worked well for me:
When I pull to refresh my RN FlatList I only wanted the first page to be refreshed/returned. I call this before I call |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With useInifiniteQuery, currently if I have already loaded N pages, then calling refetch will result in N API calls to refetch all the data. I understand that this is by design.
For a react native app, I want a pull-from-top refresh to continue to display only the first page while it is refreshed, but remove all subsequent pages from the cache and not refetch them unless the fetchMore method is called again. Can we add a way to reset the number of loaded groups in the useInfiniteQuery cache data? I've tried using queryCache.setQueryData to delete all but the first group of data, but it's not sufficient as it still seems to know that more groups were previously fetched and then proceeds to refetch them.
Beta Was this translation helpful? Give feedback.
All reactions