13 lines
420 B
Vue
13 lines
420 B
Vue
<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>
|