tRPC procedure types and typed React hooks without code generation
Define tRPC queries, mutations, and subscriptions once on the server and consume typed React hooks on the client—no separate code generation step.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Define tRPC queries, mutations, and subscriptions once on the server and consume typed React hooks on the client—no separate code generation step.
tRPC normally turns Dates into strings and drops undefined values when serializing JSON. Using a data transformer like superjson preserves rich JavaScript types, keeping your TypeScript types accurate from server to client. This post shows how to set it up, tests to verify, and the trade‑offs.