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

useSuspenseQuery.md

27 lines473 Bytes

1---
2id: useSuspenseQuery
3title: useSuspenseQuery
4---
5​
6```tsx
7const result = useSuspenseQuery(options)
8```
9​
10**Options**
11​
12The same as for [useQuery](./useQuery.md), except for:
13​
14- `throwOnError`
15- `enabled`
16​
17**Returns**
18​
19Same object as [useQuery](./useQuery.md), except that:
20​
21- `data` is guaranteed to be defined
22- `status` is either `success` or `error`
23 - the derived flags are set accordingly.
24​
25**Caveat**
26​
27[Cancellation](../guides/query-cancellation.md) does not work.