websocket connection doesn’t work for real-time updates
I have a chat window component in my react app. I want to make the component to be able to recieve real-time updates (when a user sends a message, it should auto-render the new message bubble for the recipient). I tried implementing websocket for this but it doesn’t work. The user i send a message to does not recieve it in real time and has to reload the page to get it. can u find whats wrong? Here’s my code: