Michael SchaufelbergerM
tRPC3y ago
5 replies
Michael Schaufelberger

Example for tRPC, stable version, with RSC

Hi
This may be a stupid question...
The readme of the experimental example mentions

Note You can already use tRPC with app directory, by:

using @trpc/client directly in components (both RSC and non-RSC)
use @trpc/next for client components

What do you mean by this? Do you have an example for that using the current stable version of tRPC? Especially the part for the RSC components.
I currently wouldn't mind to use tRPC in a non-optimal RSC way. But I would like to use Next's app directory to colocate files (and not having to have code in a completely different pages directory).
Was this page helpful?