Skip to main content
Version: 11.x

Step3

ts
const trpc = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000',
}),
],
});
 
const res = await trpc.greeting.query({ name: 'John' });
const res: `Hello ${string}`
ts
const trpc = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000',
}),
],
});
 
const res = await trpc.greeting.query({ name: 'John' });
const res: `Hello ${string}`