TanStack / query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
https://tanstack.com/query
MIT License
42.72k stars 2.93k forks source link

Update infinite-queries.md #8302

Closed ammar-madni closed 1 week ago

ammar-madni commented 1 week ago

The example indicates we should prevent fetching the next page if we are currently refetching. But fetching the next page of data would cancel any background re-fetches (as exepected).

I've updated the example to check we are not already fetching the next page instead as that makes more sense.