How can I clear a query's cache when I have two screens that use the same query, but one uses a param that loads a filtered subset of data?
Closed this issue · 1 comments
hoIIer commented
I have two screens: Items, Historical Items
When the user navigates to Items, it loads the items via useQuery('items'). When the user navigates to Historical Items, it tries to load historical items via useQuery('items', { historical: true }), but instead returns the cached items from the first query.
How can I make sure the historical Items are always loaded separate from regular Items?
hoIIer commented
bah, think I was passing the params incorrectly, fixing to useQuery(['items', { historical: true }]) worked.