Update 1.simple.md

Updated to use destructuring syntax.
This commit is contained in:
Cody Bontecou
2023-01-25 15:18:16 -10:00
committed by GitHub
parent 6485aa42a7
commit 6e74e44233

View File

@@ -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.value?.greeting }}</p>
<p>{{ hello?.greeting }}</p>
</div>
</template>
```