2

Using a RTK query, I'm attempting to add infinite scrolling to a Flatlist. How do I integrate the new response with the data that was previously fetched? I must also replace the existing data with the new response upon refetch.

const {data} = usePostQuery();

Is it possible to get the value of data as a combined result of current data with the previous data.

basil
  • 23
  • 4
  • Take a look at the accepted answer for this [SO question][1]: [1]: https://stackoverflow.com/questions/67909356/is-there-any-way-to-fetch-all-the-responses-stored-in-api-slice-rtk-query – draysams Feb 28 '23 at 16:18

0 Answers0