I am a DevI
tRPC3y 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
Was this page helpful?