~/talk

Making typesafe APIs easy with tRPC

Talkat Next.js Conf 2022 · on Tuesday, 2022-10-25· [typescript, developer-experience]
slides:none on file

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

  1. 0:00Introduction to tRPC
  2. 0:22API routes need type safety
  3. 1:25tRPC eliminates code generation
  4. 1:45tRPC in Next.js
  5. 3:10Defining procedures
  6. 5:17Type magic backend to frontend
  7. 6:00tRPC with React Query
  8. 8:09Type-safe results
  9. 8:30Client-server navigation
  10. 9:13Server-side rendering with tRPC
  11. 9:55When to use tRPC
  12. 11:19Credits
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.