約104件1ページ目

日本語のみで絞り込む

2022/11/9 -ideally, you would structure your query keys so that you can tackle them all in one invalidation: [FETCH_USER, userId] [FETCH_USER, userId, ...

When using APIs like invalidateQueries and removeQueries (and others that support partial query matching), you can match multiple queries by their prefix, or ...

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 ...

// Example: Invalidate a single query. queryClient.invalidateQueries('yourQueryKey');. // Example: Invalidate multiple queries. queryClient.invalidateQueries ...

2024/5/25 -Even though there is nothing built into React Query, it doesn't need a lot of code to implement automatic query invalidation in user-land ...

For a technique to automatically invalidate Queries after Mutations, have a look at TkDodo's article on Automatic Query Invalidation after Mutations. Edit on ...

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 ...

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.

Query invalidation is the process of marking cached data as stale, triggering a refetch to ensure your application displays the most up-to-date information.