TanStackT
TanStack2y ago
4 replies
ordinary-sapphire

Best practice to invalidate useSuspenseQuery

I use tanstack router and try to use the pattern of ensureQueryData and useSuspenseQuery. The query works so far great, but now trying to use queryClient.invaldiateQueries does not seem to behave the same way
useQuery
was working. How would I invalidate client side the useSuspenseQuery by provided queryKey?
Thanks
Was this page helpful?