Unable to use caller, in frontend bcz i dont have access to req and res objects
i was trying to use trpc callers, for ssr the queries, but i was not able to create one since i have req and res objects in my context, where my context looks like
it asks me to give it req and res objects which i cannot do, to use it, is there some way through which i can use the same trpc endpoints, so that i can also use them in server components?
This is my trpr Provider Wrapper
this is my trpc client, which i am using in client components,
2 Replies
I wanted to call the same apis in server components, how can i do it? Other than from server actions,
Also i am on the app router,
Any work around please?
Please feel free to tell me if i am doing something wrong in making the context
just drop req/res in createContext. it doesn't deps on anything