First Commit Test
This commit is contained in:
12
pages/trpc.vue
Normal file
12
pages/trpc.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
const { $client } = useNuxtApp()
|
||||
|
||||
const hello = await $client.hello.useQuery({ text: 'client' })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- As `superjson` is already pre-configured, we can use `time` as a `Date` object without further deserialization 🎉 -->
|
||||
tRPC Data: "{{ hello.data.value?.greeting }}" send at "{{ hello.data.value?.time.toLocaleDateString('en-EN') }}".
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user