{"library":"react-use-websocket","type":"library","category":null,"description":"react-use-websocket is a React Hook designed to simplify and robustly integrate WebSocket communication into React components. It provides a straightforward API for managing WebSocket connections, sending messages, and reacting to incoming data and connection state changes. The current stable version is 4.13.0, which has a peer dependency on React 18. For applications still using React 17, version 3.0.0 is recommended. The library focuses on ease of use, offering features like automatic JSON serialization/deserialization for messages, memoized `sendMessage` callbacks, and options for sharing a single WebSocket connection across multiple components. Its release cadence is moderate, with significant breaking changes typically aligned with major React versions or substantial API overhauls. A key differentiator is its robust handling of connection failures and an explicit API for managing the connection lifecycle, alongside experimental Socket.IO support.","language":"javascript","status":"active","version":"4.13.0","tags":["javascript","react","react-hooks","websocket","websockets","typescript"],"install":[{"cmd":"npm install react-use-websocket","imports":["import { useWebSocket } from 'react-use-websocket';","import { ReadyState } from 'react-use-websocket';","import type { Options } from 'react-use-websocket';"]},{"cmd":"yarn add react-use-websocket","imports":[]},{"cmd":"pnpm add react-use-websocket","imports":[]}],"homepage":null,"github":"https://github.com/robtaussig/react-use-websocket","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/react-use-websocket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/react-use-websocket/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}