tRPC Vue-Query
tRPC Vue-Query
Fully type-safe composables and helpers to make working with tRPC + Tanstack Query as intuitive as possible.
<script lang="ts" setup> const trpc = useTRPC() const { data: cart } = trpc.cart.get.useQuery() const { mutate: addToCart } = trpc.cart.addItem.useMutation({ onSuccess() { trpc.cart.get.invalidate() } }) </script>