react-use-websocket
react-use-websocket copied to clipboard
React Hook for WebSocket communication
**The Utility I have written to Reuse:** ``` //2 websocketConfig.js import { useEffect, useRef } from 'react'; import useWebSocket from 'react-use-websocket'; import getWebsocketHost from '../getWebsockerHost'; // IMPORTANT: Get the URL...
I configured a websocket with a pretty standard heartbeat configuration: ``` heartbeat: { message: 'ping', returnMessage: 'pong', interval: 10000, timeout: 60000 } ``` However, I noticed that no ping/pong exchanges...
Hello, I'm seeking help on why data is being jumbled, missed, and dropped when rendering from a websocket. I want to try making a ai chatbot for fun and learn...
Hello everyone! First of all, thank you for this library, saves me a ton of time. So I tried to use the heartbeat feature. On version 4.11.1 I experienced that...
Hi, im trying to use this library with a React context, according to the description unless the component unmounts the library not closing the connections in my case the connections...
The user has no control over the fact that on first render, `lastJsonMessage` will be `null`. And it always is like that (I suspect. Without digging through the code, I...
Hi, I hope this is not a duplicate, I didn't find anything related to it though. I had a question regarding this library: how can we deal with refresh tokens...
Hi, I hope this is not a duplicate, I didn't find anything related to it though. I need to have two different connections and send data to them simultaneously. I...
Good morning everyone, I noticed that React 19 has just been released, and I was wondering if this incredibly useful library is already compatible with React 19 or if we...
Is it normal to see a lot of zombie (?) connections (status 101, but messages not coming through) in chrome inspector? I expect ws connection to close on unmount, but...