Skip to content

Commit

Permalink
docs: fix-useQueries-syntax-error (#7017)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeSang1998 committed Mar 4, 2024
1 parent 962cf85 commit 663afdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/framework/react/reference/useQueries.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `useQueries` hook can be used to fetch a variable number of queries:
const ids = [1,2,3]
const results = useQueries({
queries: ids.map(id => (
{ queryKey: ['post', id], queryFn: () => fetchPost(id), staleTime: Infinity },
{ queryKey: ['post', id], queryFn: () => fetchPost(id), staleTime: Infinity }
)),
})
```
Expand Down Expand Up @@ -41,7 +41,7 @@ If you want to combine `data` (or other Query information) from the results into
const ids = [1,2,3]
const combinedQueries = useQueries({
queries: ids.map(id => (
{ queryKey: ['post', id], queryFn: () => fetchPost(id) },
{ queryKey: ['post', id], queryFn: () => fetchPost(id) }
)),
combine: (results) => {
return ({
Expand Down

0 comments on commit 663afdc

Please sign in to comment.