t
tRPC
R
tRPC
•
2y ago
•
4 replies
riprsa
Cannot figure out the correct type
I am trying to use tRPC outside of React
. I use it in React
, but I need a separate way to use it
. I found out about
trpc.useUtils().client
trpc.useUtils().client
, which is perfect
. But I want to make it a global object for CSR components
. I cannot figure out the right type to include in to the declaration
.
Thank you
Solution
export const api = createTRPCClient<AppRouter>({ ... })
export const api = createTRPCClient<AppRouter>({ ... })
Jump to solution
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
Express middleware router type isn't correct
D
DangerZone / ❓-help
3y ago
Type error: The inferred type of 'trpc' cannot be named without a reference....
J
j... / ❓-help
3y ago
TS error cause Query is not returning correct type to the client!
K
kevinka. / ❓-help
3y ago
Type error: Cannot find name publicProcedure
A
Answer Overflow / ❓-help
3y ago