update readme

This commit is contained in:
Robert Soriano
2022-05-17 15:04:51 -07:00
parent 9fac4ac4d9
commit fa7db27be1
4 changed files with 29 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
const { data, error } = await useTrpcQuery('getUser', {
name: 'john',
name: 'johns',
})
watchEffect(() => {
@@ -10,5 +10,5 @@ watchEffect(() => {
</script>
<template>
<div>hello</div>
<div>{{ data.name }}</div>
</template>

View File

@@ -13,4 +13,20 @@ export const router = trpc
resolve: () => 'world',
})
// optional
export const createContext = () => {
// ...
return {
/** context data */
}
}
// optional
export const responseMeta = () => {
// ...
return {
// { headers: ... }
}
}
export type Router = typeof router