Skip to content

Commit 4bd66a3

Browse files
authored
docs: Fix async/await syntax (#3543)
1 parent a325801 commit 4bd66a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/pages/guides/query-cancellation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ You might want to cancel a query manually. For example, if the request takes a l
129129
```js
130130
const [queryKey] = useState('todos')
131131

132-
const query = useQuery(queryKey, await ({ signal }) => {
133-
const resp = fetch('/todos', { signal })
132+
const query = useQuery(queryKey, async ({ signal }) => {
133+
const resp = await fetch('/todos', { signal })
134134
return resp.json()
135135
})
136136

0 commit comments

Comments
 (0)