There is no method like “on” and “close” in socket.io-client / socket.io
I’m building a real-time chat application using the MERN stack and Socket.IO. My backend works fine, but I’m encountering issues with the Socket.IO client in my React application. Specifically, when I try to call the on
or close
methods on the socket instance, they don’t seem to work.