useQuery select
Hi all.
Not sure about if I understand the
select correctly ( now ). But am I false to assume that the select is used for data transformation to be directly returned from the query and the modified data is not persisted in cache?
I just noticed since I'm using getQueryData and I was surprised when I was missing a part of the modified data 😉
If so I would say that I've either misread the docs or misunderstood - but would be a good pointer in the docs to make the users aware of this before hand 😄
Cheers!2 Replies
statutory-emerald•8mo ago
This option can be used to transform or select a part of the data returned by the query function. It affects the returned data value, but does not affect what gets stored in the query cache.https://tanstack.com/query/latest/docs/framework/react/reference/useQuery
xenial-blackOP•8mo ago
I knew I missed it 🤣 Maybe it should be in bold 2x the normal font size and in a warning label 🤣🤘