Long TranL
tRPC17mo ago
4 replies
Long Tran

useQuery() integration is not passing `staleTime` to underlying query? (11.0.0-rc.593)

I'm attempting to set up persistence for my queries. As part of this, I need to set
staleTime
on queries to something other than 0 to tell React Query that data loaded from storage is to be considered fresh. However, this doesn't work in practice if
staleTime
is configured at the query level. I've managed to get persistence working correctly when configuring the query client's default options.

Is there an interaction that I'm not understanding here? Any advice would be welcome, thanks!
Was this page helpful?