[Question] How to create the trpc for event subscribe and publish out of a react component ? #213
Unanswered
liaodalin19903
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
In the react demo, we know how to use the
trpcClient
to subscribe and publish event.but I think the creation step is tedious:
So, is there any method to encapsulate the
trpcClient
creation in another file?such as there has the
createTRPCProxyClient
way to create:but this
trpc
creation instance cannot use event subscription.please tell me how to create the trpc for event subscribe and publish out of a react component .
Beta Was this translation helpful? Give feedback.
All reactions