mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-24 08:50:32 +01:00
17 lines
258 B
Vue
17 lines
258 B
Vue
<script setup lang="ts">
|
|
const { data, pending } = useLazyTrpcQuery('hello', undefined)
|
|
|
|
watchEffect(() => {
|
|
console.log(data.value)
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="pending">
|
|
Loading...
|
|
</div>
|
|
<div v-else>
|
|
{{ data }}
|
|
</div>
|
|
</template>
|