react-with-websocket

JSON →
library 3.1.0 ·javascript maintenance
verified Jun 7, 2026

Higher-order components (HOCs) for integrating WebSocket connections into React applications. Current stable version is 3.1.0. It provides a declarative way to subscribe to WebSocket messages and events using React context and HOC composition. Key differentiators: explicit separation of WebSocket source (context provider), subscription creation (createSubscription), and connection injection (withWebSocket). Compared to raw WebSocket usage or hook-based libraries, this library uses a HOC pattern typical of class-component era React. It requires React 16.8.6+ and is Node 8+ compatible. Maintenance is minimal; last release was in 2019.