call trpc procedure from server component
This is more a next question, I did the setup my self to include trpc in next, it works but I can only call procedures from client components. I started a T3 project just to see how you solved this but couldn't understand much since I'm also relatively new to next. Could somebody guide me?
In the T3 template you create a trpc proxy client in the server side of trpc but couldn't understand much. So you import "api" depending if it's server or client code? (api is being exported twice in different files). Also could anybody explain the code of the pic??
Thanks!!
0 Replies