in vue3 how to use $socket.on with a function with parameters
- User
in vue3 how to use $socket.on with a function with parameters
- Assistant
To use socket.on() method. The object must have a 'callback' property that is the function you want to execute when the socket receives a message. Additionally, you can add any number of custom properties to the object that will be passed as arguments to the 'callback' function.