One WebSocket as a hook: a four-state connection machine, jittered backoff reconnects gated by a shouldReconnect predicate, an ordered outbound queue that covers the outage, JSON with a raw escape hatch, and a heartbeat that catches sockets that are open but dead.
npx shadcn@latest add @zyeon/use-websocketZyeon UI limits how often it can be asked, and useWebSocket hasn't had its turn. Its source will show here once it has.