mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 10:54:49 +00:00
21 lines
361 B
Vue
21 lines
361 B
Vue
<template>
|
|
<tr><td><b>useFetch</b></td><td> {{ fetched }}</td></tr>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, ref, useFetch } from '@nuxtjs/composition-api'
|
|
|
|
export default defineComponent({
|
|
setup () {
|
|
const fetched = ref('🚧')
|
|
useFetch(() => {
|
|
fetched.value = '✅'
|
|
})
|
|
|
|
return {
|
|
fetched
|
|
}
|
|
}
|
|
})
|
|
</script>
|