{"library":"react-with-websocket","type":"library","category":null,"description":"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.","language":"javascript","status":"maintenance","version":"3.1.0","tags":["javascript","react","react-components","higher-order-component","websocket"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install react-with-websocket","imports":["import { createSubscription } from 'react-with-websocket'","import { withWebSocket } from 'react-with-websocket'","import { WebSocketContextProvider } from 'react-with-websocket'"]},{"cmd":"yarn add react-with-websocket","imports":[]},{"cmd":"pnpm add react-with-websocket","imports":[]}],"homepage":"https://github.com/Librazy/react-with-websocket","github":"git@github.com:Librazy/react-with-websocket","docs":null,"changelog":null,"pypi":null,"npm":"react-with-websocket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}