Why is there a trpc/client and a trpc/server?
I started messing around with create t3 app with app dir and I'm wondering why there's a createTRPCReact (~/trpc/react) and a createTRPCProxyClient (~/trpc/server). What do each of these files do?
Solution:Jump to solution
Hi,
Basically, if you are in the server, you use the api from ~/trpc/server. If you are in a component that is inside a client boundary, you are in pure client-side react land and you can use the api from ~/trpc/react...
2 Replies
Solution
Hi,
Basically, if you are in the server, you use the api from ~/trpc/server. If you are in a component that is inside a client boundary, you are in pure client-side react land and you can use the api from ~/trpc/react
Both are used to interface with your trpc routes