tRPCttRPC
Powered by
MonkeyStructM
tRPC•2y ago
MonkeyStruct

Using TRPC Server Caller in client side.

What's up TRPCer.
so i'm currently working in vanilla react app with seperate backend in .NET, in previous projects i have used Next with TRPC server and honestly loved DX with it so i wanted to implement it for the react app and parse .NET server response in TRPC route func and utilize @trpc/server pkg that way and use createCaller instance to use like almost server/query func. intention was to use tanstack react query and trpc routes as basically queryFn.

Seems like that wont work tho. trpc throws not allowed to use server func in client side error.
Is there a way to make it work? or TRPC requires a server implemented with trpc server.
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

Exposing server-side caller and tRPC caller/helper through the same export?
.jsonp..jsonp / ❓-help
11mo ago
Duplicated tRPC server-side calls
PavidR 🐈🐈PPavidR 🐈🐈 / ❓-help
2y ago
Using trpc with fastify server and nextjs client
ZionZZion / ❓-help
3y ago