日本語のみで絞り込む
2023/11/13 -Using the latest version of tanstack query, is there a way to invalidate multiple queries? To be specific, I want to invalidate queries that ...
When using APIs like invalidateQueries and removeQueries (and others that support partial query matching), you can match multiple queries by their prefix, or ...
2022/11/9 -invalidateQueries is a Promise, so you can just await them in your ・ you can tackle them all in one invalidation: How to handle multiple ...
2021/3/12 -It appears that I can't pass multiple keys to queryClient.invalidateQueries . For example in following code, query for only key1 gets ...
For a technique to automatically invalidate Queries after Mutations, have a look at TkDodo's article on Automatic Query Invalidation after Mutations. Edit on ...
2024/5/25 -Invalidation merely refetches all active Queries that it matches, and marks the rest as stale , so that they get refetched when they are used ...
2022/10/25 -According to the documentation, invalidateQueries marks the existing data as stale. This will trigger refetching, not initial fetching.
2022/10/13 -This post will cover how you can specify which queries to invalidate in ReactQuery with queryClient.invalidateQueries().
I found this answer because I couldn't find the documented behavior of invalidateQueries when using object as part of the key.
Instead, TanStack Query provides a useQueries hook, which you can use to dynamically execute as many queries in parallel as you'd like. useQueries accepts ...