Donald Biden
A simple example of using SSE and subscriptions
Hello! Congrats on launching v11 🚀 I'm having a hard time to understand subscriptions](https://trpc.io/docs/server/subscriptions), specially the full stack example which is already a bit complex. Just wondering if there is a simple example somewhere without using React for example and just a basic subscription when a todo item is added for example.
Also, is it just me or the
onComplete
, onData
, etc options in a plain subscription got removed and is only available in useSubscription()
? The types from v10 have it https://github.com/trpc/trpc/blob/3bc06d055d3b860d978e9c465bce56fdcf95b71f/packages/client/src/internals/TRPCUntypedClient.ts#L32
Thanks!5 replies
Guides on authoring own client like `@trpc/react`
Hello, are there plans or guides to create own client
useQuery
in @trpc/react
? I'm asking this because I plan to create something for Svelte + Tanstack Svelte Query but looking at the source code for v11, the types are scattered all around and i cannot seem to follow. Also, there is
1. createRecursiveProxy
2. createTRPCClientProxy
3. createTRPCFlatProxy
and many others which is sooo confusing
Any help would be much appreciated1 replies