Tanstack Query: Use queryOptions
type helper instead of UseQueryResult
#1788
Labels
queryOptions
type helper instead of UseQueryResult
#1788
Tanstack Query recommends using the
queryOptions
type helper instead of manually typing query results. This is now their recommended standard.Not using this helper has already led to some problems because
QueryOptions
andSuspenseQueryOptions
are now incompatible. This means that generatedgetUse*SuspenseQueryOptions()
are not usable inuseSuspenseQuery
/useSuspenseQueries
in the current version.Minimal, reproducible example
https://codesandbox.io/p/devbox/rough-brook-drv2hx
Steps to reproduce
The text was updated successfully, but these errors were encountered: