t
tRPC
P
tRPC
•
3y ago
•
2 replies
Pieter
How can I make a direct fetch on a router endpoint from TRPC in NextJS on client?
In the documentation you can use the vanilla TRPC client like this
:
const bilbo = await client.getUser.query('id_bilbo');
const bilbo = await client.getUser.query('id_bilbo');
But with NextJS app is wrapped with the WithTRPC wrapper
. where you can only use hooks
. How can I make a direct call
?
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How can you fetch data on a dynamic router with trpc?
J
josephbranch / ❓-help
3y ago
How can i createCaller from a NextJs App Router if my server uses express tRPC adapter?
K
Kylar / ❓-help
3y ago
PersistQueryClientProvider in tRPC NextJS pages router app
A
Answer Overflow / ❓-help
3y ago
Can i fetch tRPC in different project
C
coco / ❓-help
3y ago