Skip to content

Commit 213a85d

Browse files
committed
add awaits back in
1 parent 3ac2ac8 commit 213a85d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/framework/react/guides/prefetching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This is how you use `query` to prefetch:
4646
import { noop } from '@tanstack/react-query'
4747

4848
const prefetchTodos = () => {
49-
void queryClient
49+
await queryClient
5050
.query({
5151
queryKey: ['todos'],
5252
queryFn: fetchTodos,
@@ -66,7 +66,7 @@ Infinite Queries can be prefetched like regular Queries. By default, only the fi
6666
import { noop } from '@tanstack/react-query'
6767

6868
const prefetchProjects = () => {
69-
void queryClient
69+
await queryClient
7070
.infiniteQuery({
7171
queryKey: ['projects'],
7272
queryFn: fetchProjects,

0 commit comments

Comments
 (0)