trpc-react-query
Installation
SKILL.md
tRPC with React Query
Use tRPC v11 with the TanStack React Query integration (@trpc/react-query). Use queryOptions / mutationOptions factories — never the legacy trpc.useQuery wrapper hooks.
Server Setup
Initialize tRPC
// server/trpc.ts
import { initTRPC, TRPCError } from "@trpc/server"
import superjson from "superjson"
import { ZodError } from "zod"