{"library":"react-use-websocket-lite","type":"library","category":null,"description":"A lightweight React hook for WebSocket communication, forked from react-use-websocket and stripped of SocketIO, EventSource, and connection sharing features. Current stable version 1.1.0 (Feb 2025) targets React 18 and 19, ships TypeScript definitions, and reduces unnecessary re-renders compared to the original. It offers simple URL-based connection, automatic reconnection, and event callbacks (onOpen, onClose, onMessage, onError) while being easier to use performantly.","language":"javascript","status":"active","version":"1.1.0","tags":["javascript","react","react-hooks","websocket","websockets","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install react-use-websocket-lite","imports":["import useWebSocket from 'react-use-websocket-lite'","import { ReadyState } from 'react-use-websocket-lite'","import { SendMessage } from 'react-use-websocket-lite'"]},{"cmd":"yarn add react-use-websocket-lite","imports":[]},{"cmd":"pnpm add react-use-websocket-lite","imports":[]}],"homepage":"https://github.com/michaelboyles/react-use-websocket-lite#readme","github":"https://github.com/michaelboyles/react-use-websocket-lite","docs":null,"changelog":null,"pypi":null,"npm":"react-use-websocket-lite","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}