-
I'm a bit confused about the inner workings of Let's say that my api will return an infinite number of pages, and the user scrolls a TON (thus loading a lot of data). Will react-query just keep filling up until there is an OOM error? Or is it "smart" enough to handle this case and un-load unused data? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
you need to specify |
Beta Was this translation helpful? Give feedback.
you need to specify
maxPages
if you want to limit the amount of pages that get cached.https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5#limited-infinite-queries-with-new-maxpages-option