react-use-websocket-lite
JSON →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.
Resources
packagereact-use-websocket-lite ↗