Skip to content

Commit 4307a80

Browse files
authored
docs(react-query): update returning type (#5838)
1 parent 038be27 commit 4307a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/react/guides/migrating-to-v5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ See the [useQueries docs](../reference/useQueries#combine) for more details.
467467
With v5, suspense for data fetching finally becomes "stable". We've added dedicated `useSuspenseQuery`, `useSuspenseInfiniteQuery` and `useSuspenseQueries` hooks. With these hooks, `data` will never be potentially `undefined` on type level:
468468

469469
```js
470-
const [post] = useSuspenseQuery({
470+
const {data: post} = useSuspenseQuery({
471471
// ^? const post: Post
472472
queryKey: ['post', postId],
473473
queryFn: () => fetchPost(postId),

0 commit comments

Comments
 (0)