tRPC provides a great developer experience by enforcing tight, full-stack type bindings through the power of TypeScript. No API contract drift, no code generation.
Since our last major version release in August 2021, the tRPC community has seen substantial growth:
- We now have over 15,000 stars on GitHub
- A Discord community with over 2,000 members
- 100k+ weekly npm downloads
- Nearly 200 contributors
- A growing ecosystem of extensions, examples, and content
Today, we're launching tRPC v10. We're excited to share that v10 is already being used in production by many large TypeScript projects. This official release announces general availability to the wider community.
For new projects, you can get up and running with an example application to learn about tRPC v10. For projects that were already enjoying tRPC v9, visit the v10 migration guide.
Overview of changesโ
v10 is tRPC's biggest release ever. This is the first time we've made any fundamental changes to the structure of tRPC and we believe these changes unlock new possibilities for fast-moving teams working on cutting edge applications.
Improved developer experienceโ
tRPC v10 embraces your IDE. We want to unify your types - but we've also brought together your frontend, backend, and editing experience in this version.
With v10, you can:
- Use "Go to Definiton" to jump straight from your frontend consumer to your backend procedure
- Use "Rename Symbol" to give a new name to an input argument or procedure across your whole application
- Infer types more easily for when you'd like to use your tRPC types in your application manually
Powerful backend frameworkโ
In v10, we've revisited the syntax for how you define your backend procedures, opening up more opportunities to bring in your desired logic in healthy ways. This version of tRPC features:
- Reusable middlewares with Context Swapping
- Chainable & reusable procedures with the ability to use multiple input parsers
- Flexible error handling with custom error formatting
- Procedure metadata to decorate your procedures with more information
Massively improved TypeScript performanceโ
TypeScript enables developers to do incredible things - but it can come at a cost. Many of the techniques we use to keep your types tight are heavy work on the TypeScript compiler. We heard community feedback that the largest applications using tRPC v9 were beginning to suffer from decreased performance in developers' IDEs as a result of this compiler pressure.
Our goal is to enhance the developer experience for applications of all sizes. In v10, we've dramatically improved TypeScript performance (especially with TS incremental compilation) so that your editor stays snappy.
Incremental migrationโ
We've also put in a lot of work to make the migration experience as straightforward as possible, including an interop()
method that allows (almost) full backward compatibility with v9 routers. Visit the migration guide for more information.
Sachin from the core team has also made a codemod that can do much of the heavy lifting of the migration for you.
A growing ecosystemโ
A rich set of sub-libraries is continuing to form around tRPC. Here are a few examples:
- trpc-openapi to easily create REST-compataible endpoints
- create-t3-app to bootstrap a full-stack Next.js application with tRPC
- create-t3-turbo to kickstart your next React Native app with tRPC
- trpc-chrome for building Chrome extensions using tRPC
- Adapters for frameworks like Solid, Svelte, and Vue
For more plugins, examples, and adapters, visit the Awesome tRPC collection.
Thank you!โ
The core team and I want you to know: we're just getting started. We're already busy experimenting with React Server Components and Next.js 13.
I also want to give a huuuge shoutout to Sachin, Julius, James, Ahmed, Chris, Theo, Anthony, and all the contributors who helped make this release possible.
Thanks for using and supporting tRPC.
- Follow @trpcio on Twitter.
- Join our Discord-community
- Try out tRPC in your browser