mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45:53 +00:00
docs: make useFetch
example consistent with others (#4742)
This commit is contained in:
parent
51ebfd3521
commit
82f959d91f
@ -73,11 +73,11 @@ This composable provides a convenient wrapper around `useAsyncData` and `$fetch`
|
||||
|
||||
```vue [app.vue]
|
||||
<script setup>
|
||||
const { data } = await useFetch('/api/count')
|
||||
const { data: count } = await useFetch('/api/count')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
Page visits: {{ data.count }}
|
||||
Page visits: {{ count }}
|
||||
</template>
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user