Skip to content

Commit ec0c4f9

Browse files
ci: apply automated fixes
1 parent 8a3f9d4 commit ec0c4f9

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

docs/framework/react/guides/prefetching.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This is how you use `query` to prefetch:
4343
[//]: # 'ExamplePrefetchQuery'
4444

4545
```tsx
46-
import { noop } from "@tanstack/react-query"
46+
import { noop } from '@tanstack/react-query'
4747

4848
const prefetchTodos = () => {
4949
void queryClient
@@ -63,16 +63,18 @@ Infinite Queries can be prefetched like regular Queries. By default, only the fi
6363
[//]: # 'ExamplePrefetchInfiniteQuery'
6464

6565
```tsx
66-
import { noop } from "@tanstack/react-query"
66+
import { noop } from '@tanstack/react-query'
6767

6868
const prefetchProjects = () => {
69-
void queryClient.infiniteQuery({
70-
queryKey: ['projects'],
71-
queryFn: fetchProjects,
72-
initialPageParam: 0,
73-
getNextPageParam: (lastPage, pages) => lastPage.nextCursor,
74-
pages: 3, // prefetch the first 3 pages
75-
}).catch(noop)
69+
void queryClient
70+
.infiniteQuery({
71+
queryKey: ['projects'],
72+
queryFn: fetchProjects,
73+
initialPageParam: 0,
74+
getNextPageParam: (lastPage, pages) => lastPage.nextCursor,
75+
pages: 3, // prefetch the first 3 pages
76+
})
77+
.catch(noop)
7678
}
7779
```
7880

0 commit comments

Comments
 (0)