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

useSuspenseQuery.md

29 lines510 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), except for:
13​
14- `throwOnError`
15- `enabled`
16- `placeholderData`
17​
18**Returns**
19​
20Same object as [useQuery](../useQuery), except that:
21​
22- `data` is guaranteed to be defined
23- `isPlaceholderData` is missing
24- `status` is always `success`
25 - the derived flags are set accordingly.
26​
27**Caveat**
28​
29[Cancelation](../guides/query-cancellation.md) does not work.