tRPCttRPC
Powered by
imhoffdI
tRPC•3y ago•
1 reply
imhoffd

How to use NextJS tRPC client without hooks?

I want to use the vanilla tRPC client in NextJS (both browser+server), but I can't because it doesn't support the page context (
ctx
ctx
w/
req
req
and
res
res
).

tRPC Next seems to be built on top of React Query, which I don't want to use (it switches
query()
query()
and
mutate()
mutate()
to
useQuery()
useQuery()
and
useMutate()
useMutate()
, which can only be used in components).

Am I missing something?
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

How to access hooks while initializating react query client for nextJS?
lukasLlukas / ❓-help
4y ago
Use mutation trpc with nextJs
Answer OverflowAAnswer Overflow / ❓-help
3y ago
How to use trpc react hooks from an external data source
.westsaid..westsaid / ❓-help
4y ago