T
TanStack2y ago
vicious-gold

What is the expected behaviour of `setQueryData(aKey, undefined)` on v5 according to documentation?

Documentation (https://tanstack.com/query/v5/docs/react/reference/QueryClient#queryclientsetquerydata) If the value is undefined, the query data is not updated. But in my case the data is set to undefined. Does not follow the doc's description
QueryClient | TanStack Query Docs
QueryClient The QueryClient can be used to interact with a cache:
2 Replies
extended-salmon
extended-salmon2y ago
Codesandbox reproduction?
wise-white
wise-white2y ago
GitHub
query/packages/query-core/src/queryClient.ts at 9b1aa77010637506b92...
🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query. - TanStack/query

Did you find this page helpful?