tRPCttRPC
Powered by
riprsaR
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
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

Express middleware router type isn't correct
DangerZoneDDangerZone / ❓-help
3y ago
Type error: The inferred type of 'trpc' cannot be named without a reference....
j...Jj... / ❓-help
3y ago
TS error cause Query is not returning correct type to the client!
kevinka.Kkevinka. / ❓-help
3y ago
Type error: Cannot find name publicProcedure
Answer OverflowAAnswer Overflow / ❓-help
3y ago