query
query copied to clipboard
remove `remove` returned from `useQuery`
context
remove removes the query from the queryCache without informing observers about it. It is best used to remove data imperatively that is no longer needed, e.g. when logging a user out.
It doesn't make much sense to do this while a query is still active, because it will just trigger a hard loading state with the next re-render. So when would you ever use the remove function returned from useQuery, because at that point, you still have an active observer ?
proposal
- remove
removein v5