Closed siddharthkul closed 1 year ago
Leaving what worked for me here:
const payload = {
name: "John",
message: "Hello World"
};
sendMessage(`42["chat_room",${JSON.stringify(payload)}]`);
Seems a little hackey :(
Link to socketio encoding/decoding protocol - https://github.com/socketio/socket.io-protocol
I ended up using implementation as shown in this article - https://socket.io/how-to/use-with-react-hooks
Hello, I couldn't find documentation for this but how do we send a message to a certain topic with useSocketIO hook ?
Below is the vanilla socketIO implementation that I'm trying to achieve