React Native FlatList with useInfiniteQuery #1218
Replies: 3 comments
-
i also have this problem, optimistic response don't work in a flatlist |
Beta Was this translation helpful? Give feedback.
-
I have no experience with react-native, so that being said: The data returned from You can see that in the example here:
|
Beta Was this translation helpful? Give feedback.
-
In react-query v3, you can now transform the response https://react-query-beta.tanstack.com/guides/migrating-to-react-query-3#query-data-selectors A paginated record will give the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a long list of data in
Firestore
which I want to show on aFlatList
I want to fetch 10 records each time. When user scrolls till the last item, it should trigger next fetch.
I tried with
useInfiniteQuery
, but struggling at showing data onFlatList
as it is not array.Could someone guide me on how to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions