Reuse tRPC client context in a turborepo structure
I am using a turbo monorepo with tRPC and some nextjs apps. I want to create component and hooks packages that uses the app's own trpc client without having to define it all over again inside each package. I was thinking that i could use the client provider to give me the right client inside the components and hooks, but it does not seems to be obvious how to hook on the trpc client's context to do so. Is this the correct thought or there's a more elegant solution to this problem?
0 Replies