We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f65623f commit f6aaa85Copy full SHA for f6aaa85
docs/src/pages/guides/query-functions.md
@@ -36,11 +36,11 @@ While most utilities like `axios` or `graphql-request` automatically throw error
36
37
```js
38
useQuery(['todos', todoId], async () => {
39
- const { ok, json } = await fetch('/todos/' + todoId)
40
- if (!ok) {
+ const response = await fetch('/todos/' + todoId)
+ if (!response.ok) {
41
throw new Error('Network response was not ok')
42
}
43
- return json()
+ return response.json()
44
})
45
```
46
0 commit comments