tRPCttRPC
Powered by
Donald BidenD
tRPC•11mo ago•
11 replies
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
onComplete
,
onData
onData
, etc options in a plain subscription got removed and is only available in
useSubscription()
useSubscription()
? The types from v10 have it https://github.com/trpc/trpc/blob/3bc06d055d3b860d978e9c465bce56fdcf95b71f/packages/client/src/internals/TRPCUntypedClient.ts#L32

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

SSE Subscriptions freeze app when multiple tabs open
MugetsuMMugetsu / ❓-help
6mo ago
Are there any example of subscriptions working with react native ?
Ahmed EidAAhmed Eid / ❓-help
4y ago
Max number of subscriptions
MarkusMMarkus / ❓-help
10mo ago
Does anyone have an example of subscriptions implemented in CloudFlare Workers?
cruhlCcruhl / ❓-help
2y ago