Skip to content
Intent
Libraries
Loading libraries…
Blog
Blog & Release Notes
About
YouTube
The official TanStack channel.
Workshops
Live sessions from the maintainers.
Release Notes
The latest releases and changelog.
Community
Channels
Discord
Real-time community support.
GitHub
Source, issues, discussions, and releases.
People & Work
Maintainers
Meet the people maintaining the stack.
Showcase
Projects selected by the TanStack team.
Community projects
TanChat
NEW
Tools
Tools
Application Starter
Alpha
Generate TanStack app starters.
Stats
NPM and ecosystem usage data.
Merch
Support
Support
Support Overview
Find the right support path.
Partners
Companies supporting TanStack.
OSS Sponsors
Sponsors keeping TanStack open source.
Enterprise Support
Private consulting and expert support.
Contact
Get in touch with the TanStack team.
About
Ethos
How we approach open source.
Tenets
The values that shape TanStack libraries.
Design System
Logos, tokens, and UI components.
Search
Ask AI
Libraries
Blog
Community
TanChat
NEW
Tools
Merch
Support
Search
Ask AI
Sign In
Back
TanStack Intent
/
Registry
/
@trpc/next
Fetching package from npm...
TanStack Intent
/
Registry
/
@trpc/next
@trpc/next
11.22.2-canary.37.6d6969c7c (latest) — 2 skills
11.22.2-canary.19.b9321728b — 0 skills
11.22.2-canary.16.ea96ec538 — 0 skills
11.22.2-canary.15.a81bba207 — 0 skills
11.22.2-canary.11.4427f0bea — 0 skills
11.22.2-canary.9.85bcf328a — 2 skills
11.22.2-canary.7.c01346ec8 — 2 skills
11.22.2-canary.6.9959a177b — 2 skills
11.22.2-canary.1.0c622a522 — 2 skills
11.21.1-canary.65.e2b808347 — 2 skills
11.22.1 — 2 skills
11.21.1-canary.20.10e2ef98f — 2 skills
11.19.1-canary.0.sha-8b649ad87 — 2 skills
11.19.0 — 2 skills
11.18.1-canary.30 — 2 skills
11.18.1-canary.15 — 2 skills
11.18.1-canary.9 — 2 skills
11.18.1-canary.19 — 2 skills
11.18.1-canary.35.sha-573d4f33e — 2 skills
11.18.1-canary.34.sha-3a77dc4d6 — 2 skills
11.18.1-canary.18 — 2 skills
11.18.1-canary.5 — 2 skills
11.18.1-canary.2 — 2 skills
11.18.1-canary.1 — 2 skills
11.18.0 — 2 skills
11.17.1-canary.3 — 2 skills
11.17.1-canary.2 — 2 skills
11.17.0 — 2 skills
11.16.1-canary.20 — 2 skills
11.16.1-canary.17 — 2 skills
11.16.1-canary.6 — 2 skills
11.16.1-canary.5 — 2 skills
11.16.1-canary.4 — 2 skills
11.16.1-canary.3 — 2 skills
11.16.1-canary.2 — 2 skills
11.16.1-canary.1 — 2 skills
11.16.0 — 2 skills
11.15.2 — 2 skills
11.15.2-canary.3 — 2 skills
11.15.2-canary.2 — 2 skills
11.15.1 — 2 skills
11.15.1-canary.2 — 2 skills
11.15.0 — 2 skills
11.14.2-canary.5 — 2 skills
11.14.1 — 2 skills
Copy install prompt
The tRPC Next.js library
Skills
(2)
Skills
All Skills
2
nextjs-app-router
nextjs-pages-router
Skills
2
History
nextjs-app-router
Full end-to-end tRPC setup for Next.js App Router with @trpc/tanstack-react-query. Covers the route handler with fetchRequestHandler (GET + POST exports), a per-request QueryClient that dehydrates pending queries, TRPCProvider and useTRPC() in client components, createTRPCOptionsProxy with prefetch and HydrateClient/HydrationBoundary in server components, useSuspenseQuery for Suspense, createCaller or fetchQuery for data on the server, and tRPC-powered Server Actions.
479 lines
nextjs-pages-router
Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext (config, transformer, ssr, ssrPrepass, responseMeta) and the withTRPC HOC over @trpc/react-query hooks. Prefetch selected pages with createServerSideHelpers in getServerSideProps or getStaticProps and return trpcState, or SSR every query with ssr true, forwarding request headers.
486 lines