Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/2.guide/2.features/5.data-fetching.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -182,7 +182,7 @@ The example below adds the request headers to an isomorphic `fetch` call to ensu

```vue
<script setup>
const { data } = useFetch('/api/me', {
const { data } = await useFetch('/api/me', {
headers: useRequestHeaders(['cookie'])
})
</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.api/1.composables/use-fetch.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ By default, Nuxt waits until a `refresh` is finished before it can be executed a
## Example

```ts
const { data, pending, error, refresh } = useFetch(
const { data, pending, error, refresh } = await useFetch(
'https://api.nuxtjs.dev/mountains',
{
pick: ['title']
Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.api/1.composables/use-route.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Within the template of a Vue component, you can access the route using `$route`.

## Example

In the following example, we call an API via `useAsyncData` using a dynamic page parameter - `slug` - as part of the URL.
In the following example, we call an API via `useFetch` using a dynamic page parameter - `slug` - as part of the URL.

```html [~/pages/[slug].vue]
<script setup>
Expand Down