{"library":"react-realtime-hooks","type":"library","category":null,"description":"A production-ready React library providing composable hooks for WebSocket and Server-Sent Events (SSE) with auto-reconnect, heartbeat, typed connection states, and browser network awareness. Current stable version is 2.0.2, released in 2024, with a release cadence of approximately monthly. Key differentiators include discriminated connection snapshots (idle, connecting, open, reconnecting, closing, closed, error), exponential backoff with jitter, heartbeat with ack matching and latency measurement, environment-aware connection gating for offline state and background tabs, and zero runtime dependencies beyond React. Ships TypeScript types, supports React 18+, and is SSR- and Strict Mode-safe.","language":"javascript","status":"active","version":"2.0.2","tags":["javascript","react","hooks","websocket","eventsource","sse","reconnect","heartbeat","network","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install react-realtime-hooks","imports":["import { useWebSocket } from 'react-realtime-hooks'","import { useEventSource } from 'react-realtime-hooks'","import { ConnectionState } from 'react-realtime-hooks'","import { useConnectionGate } from 'react-realtime-hooks'"]},{"cmd":"yarn add react-realtime-hooks","imports":[]},{"cmd":"pnpm add react-realtime-hooks","imports":[]}],"homepage":"https://github.com/volkov85/react-realtime-hooks#readme","github":"https://github.com/volkov85/react-realtime-hooks","docs":null,"changelog":null,"pypi":null,"npm":"react-realtime-hooks","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}