Nuxt/test/fixtures/bridge/components/FetchTest.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>