-
The |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
invalidation never removes something from the cache, it just refetches. |
Beta Was this translation helpful? Give feedback.
-
If you edit some data related to a record, and return the user back to the record's page, removeQueries() works well so you don't show them the previous version of data they just edited while the query is refetching. |
Beta Was this translation helpful? Give feedback.
-
I used |
Beta Was this translation helpful? Give feedback.
removeQueries
has no effect on active queries. If a component re-renders for some reason that then tries to use the removed query, it will go into hard loading state again. Not sure why you'd ever want to remove an active query...invalidateQueries
is something completely different. It:stale
, so that they will be refetched the next time they are usedinvalidation never removes something from the cache, it just refetches.