tRPCttRPC
Powered by
I am a DevI
tRPC•3y ago•
7 replies
I am a Dev

Hello, is there any way to create a base router with common procedures? like an interface

I want all routers that use it have the state procedure (subscriptions), so I can create a common hook later

Although the implementation of the methods is completely different on each router, I just want to guarantee that they have those procedures, like an interface

The hook basically will subscribe to the state on mount, and unsubscribe on unmount

Thanks
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Question: Is there a way to have a base interface for Trpc router?
MayankMMayank / ❓-help
2y ago
Is there a way to call procedures more directly without a router?
Michael SchaufelbergerMMichael Schaufelberger / ❓-help
2y ago
Is there any easy way to create a Type for a trpc router
JokcyJJokcy / ❓-help
3y ago
Is there a way to use versioning for procedures?
v1narthVv1narth / ❓-help
3y ago