tRPCttRPC
Powered by
boneyB
tRPC•3y ago•
2 replies
boney

tRPC Client within Next.js but with external standalone server?

Hi,

I have an old Next.js project that used tRPC and we're currently in the process of separating out the frontend and backend parts of it for various reasons. To reuse code, I was hoping to set up a standalone tRPC Server

In that case, what's the recommended method of setting up a tRPC Client on the Next side? using
@trpc/next
@trpc/next
or
@trpc/react
@trpc/react
?

I tried (briefly) using
@trpc/next
@trpc/next
and it was giving me issues around not having a
QueryClient
QueryClient
set - but im not sure if the react method is the way to go either.
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

tRPC Express server with Next.js
sumatokenSsumatoken / ❓-help
3y ago
Deduplicating identical queries in tRPC httpBatchLink (standalone server + Next.js server-side)
webdevisfunWwebdevisfun / ❓-help
6mo ago
tRPC standalone server in monorepo
HuzefHHuzef / ❓-help
3y ago