- Frontend - instead of
fetch('/api/user/1')
→trpc.userById.query('1')
- End-to-End Type Safety from frontend to backend by defining input/output types
- Can be used with auto-completion without Swagger, Postman, or REST API documentation
- Integrated with React Query for automated caching and refetching
In the React ecosystem, since TanStack Query has become the standard for server state synchronization, the tRPC team abandoned their own caching and adopted React Query.
tRPC Usages