[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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In the react demo, we know how to use the
trpcClientto subscribe and publish event.but I think the creation step is tedious:
So, is there any method to encapsulate the
trpcClientcreation in another file?such as there has the
createTRPCProxyClientway to create:but this
trpccreation 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