Client Setup

Create a vanilla tRPC client with createTRPCClient<AppRouter>(), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.

trpc b05fc97 7.3 KB Updated

File contents

trpc/trpc/tree/main/packages/client/skills/client-setup commit b05fc971ff

Frequently asked questions

npx skillmds@latest add trpc/client-setup