Making typesafe APIs easy with tRPC
summary
Claims that tRPC provides no schema or code generation and then shows it: a Next.js app defines an app router with a greetings procedure, the client calls trpc.greeting.useQuery and gets IDE prompts for the exact input shape. Changing property names or types produces immediate TypeScript errors, result.data exposes text with correct typed shape, and jumping to definition navigates to server code so refactors propagate to the client. Demo also shows react-query integration, HTTP batching, and toggling SSR true/false — the demo works as shown.
AI-written summary · about
chapters (12)
- 0:00Introduction to tRPC
- 0:22API routes need type safety
- 1:25tRPC eliminates code generation
- 1:45tRPC in Next.js
- 3:10Defining procedures
- 5:17Type magic backend to frontend
- 6:00tRPC with React Query
- 8:09Type-safe results
- 8:30Client-server navigation
- 9:13Server-side rendering with tRPC
- 9:55When to use tRPC
- 11:19Credits
related talks
12mtRPC: Better than REST GraphQL?
34mGraphQL, tRPC, and your tech tool box
05mFull-stack & Typesafe React (+Native) Apps with tRPC.io
27mTake a rest from REST
28mRapid Fullstack Development with Nuxt 3 and tRPC
27mWeb applications of the future with TypeScript and GraphQL
34mAchieving end to end typesafety
25mWeb applications of the future with TypeScript and GraphQL
