mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
@@ -107,12 +107,12 @@ export default defineNuxtPlugin(() => {
|
||||
<script setup lang="ts">
|
||||
const { $client } = useNuxtApp()
|
||||
|
||||
const hello = await $client.hello.useQuery({ text: 'client' })
|
||||
const { data: hello } = await $client.hello.useQuery({ text: 'client' })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>{{ hello.data?.greeting }}</p>
|
||||
<p>{{ hello?.greeting }}</p>
|
||||
</div>
|
||||
</template>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user