T
TanStack3y ago
ambitious-aqua

React-query, prefetch and fetch

Using react-query, what happens if you prefetch and while the prefetch is still happening, you click on a button (or whatever that triggers fetch) that fetches? Does the prefetch get cancelled, or does the fetch get cancelled? If both do not get cancelled, which data would be used? What if the prefetched data are stale and the fetched data come before the prefetched data?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?