tRPC in the Next.js App Router
Server Components, Server Actions and React Query with tRPC's experimental App Router APIs. Each page shows one way to use them.
Showcase pages
Server functions with only @trpc/server, and no other @trpc/* packages
Prefetch in a Server Component, then read and invalidate the query on the client
Call procedures from Server Components, cache them, and revalidate the cache
Client-side data fetchingNot implemented
Fetch from a Client Component
Procedures as Server Actions, with useAction and forms
Read in a Server Component, write with a Server Action, then revalidate