react-use-websocket@4.13.0
// React Hook for WebSocket communication
$ npm install react-use-websocket
downloads/wk
499,720
license
MIT
version
4.13.0
published
Feb 4, 2025
What is react-use-websocket?
react-use-websocket is a React Hook that simplifies WebSocket communication in your React applications by providing a declarative interface for managing connections and message handling. Developers use it to avoid manually managing WebSocket lifecycle events and state, reducing boilerplate code when building real-time features like live notifications, chat, or data streaming. It handles connection management, message sending/receiving, and reconnection logic automatically within React's component lifecycle.
Links
Keywords
Maintainers
robtaussig