T
tRPC

TRPC Vanilla Client (T3 stack)

TRPC Vanilla Client (T3 stack)

Mmeow7/16/2023
I'm using the T3 stack (Next + TRPC + etc) and I'm trying to figure out how to do vanilla queries that don't come with the baggage of a hook.
const hello = await api.example.hello.useQuery()
const hello = await api.example.hello.useQuery()
Jjkob_7/18/2023
Hey - had the same issue and think I have figured out a solution. The useQuery options were all coming from createTRPCNext<AppRouter>. I think this creates the ability to get the frontend hooks but doesn't create the normal async await versions. If you create an additional object, a createTRPCProxyClient<AppRouter> I think that creates the async/await queries you might be looking for Don't work for trpc so might be wrong though.

Looking for more? Join the community!

T
tRPC

TRPC Vanilla Client (T3 stack)

Join Server