Recipes
Practical oRPC recipes for testing and mocking, validation, monorepos, publishing a typed client to npm, faster SSR, and fixing common TypeScript errors.
Short guides for common tasks and problems.
- Testing and Mocking: test procedures directly and mock them.
- Validation Customization: turn off validation or shape validation errors.
- Monorepo Setup: keep types end to end across packages.
- Publish Client to NPM: ship your client as a typed SDK.
- Optimizing SSR: skip HTTP when rendering on the server.
- Dedupe Middleware: avoid repeating expensive middleware work.
- No Throw Literal: why oRPC expects
Errorinstances. - Exceeds the Maximum Length Problem: fix the error for very large router types.