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">
|
<script setup lang="ts">
|
||||||
const { $client } = useNuxtApp()
|
const { $client } = useNuxtApp()
|
||||||
|
|
||||||
const hello = await $client.hello.useQuery({ text: 'client' })
|
const { data: hello } = await $client.hello.useQuery({ text: 'client' })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<p>{{ hello.data?.greeting }}</p>
|
<p>{{ hello?.greeting }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user