Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

useSuspenseQuery.md

27 lines473 Bytes

const result = useSuspenseQuery(options)

Options

The same as for useQuery, except for:

  • throwOnError
  • enabled

Returns

Same object as useQuery, except that:

  • data is guaranteed to be defined
  • status is either success or error
    • the derived flags are set accordingly.

Caveat

Cancellation does not work.