FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
tRPC Has a Free API You're Not Using
NewsWeb Development

tRPC Has a Free API You're Not Using

via Dev.to WebdevAlex Spinov4h ago

tRPC gives you end-to-end type safety between your frontend and backend without code generation or schemas. But most developers only use basic queries and mutations. The Free APIs You're Missing 1. Subscriptions — Real-Time Data with WebSockets // server import { observable } from " @trpc/server/observable " ; import { EventEmitter } from " events " ; const ee = new EventEmitter (); const appRouter = router ({ onNewMessage : publicProcedure . subscription (() => { return observable < Message > (( emit ) => { const handler = ( msg : Message ) => emit . next ( msg ); ee . on ( " message " , handler ); return () => ee . off ( " message " , handler ); }); }), sendMessage : publicProcedure . input ( z . object ({ text : z . string () })) . mutation (({ input }) => { const msg = { id : crypto . randomUUID (), text : input . text }; ee . emit ( " message " , msg ); return msg ; }), }); // client const { data } = trpc . onNewMessage . useSubscription ( undefined , { onData : ( msg ) => console

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles

telecheck and tyms past
News

telecheck and tyms past

Lobsters • 4h ago

What Organizations Know About Themselves
News

What Organizations Know About Themselves

Medium Programming • 4h ago

News

Making HNSW actually work with WHERE clauses

Lobsters • 5h ago

Stop Using Claude Code Like a Chat Window
News

Stop Using Claude Code Like a Chat Window

Medium Programming • 6h ago

The Pixel 10a doesn’t have a camera bump, and it’s great
News

The Pixel 10a doesn’t have a camera bump, and it’s great

TechCrunch • 7h ago

Discover More Articles