best practices for middleware? #984
Replies: 3 comments 3 replies
|
Hi @Chandraprakash-Darji! I'm Dosu and I’m helping the orpc team. You're on the right track with composable middleware and context extension, but there are a few best practices from the orpc ecosystem that can help you improve:
Refactoring suggestion: In These patterns are widely used in orpc and help keep your middleware efficient, composable, and easy to reason about. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
Please remove |
|
@unnoq Thanks, was trying every bit of code changes but didn't work. Thanks for help, it worked. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have two middleware: auth and brandId. I have shared my current implementation but I don't feel like it is best approach.
I am building for the first time with orpc. I want to do chain the middleware but typescript not letting me do it
middleware.tsrouter.tscontract.tsbase.tsAll reactions