Open stefa168 opened 3 years ago
Would it have something to do with this library still using socket.io v2.x instead of v3.x?
what you should do is:
sockets: {
my_listener({firstObject, secondObject}) {
console.log(firstObject);
console.log(secondObject);
}
}
I have written a small component that listens to an event. This event is expected to receive two values:
When the listener is triggered, firstObject receives an object that contains both firstObject and secondObject, which isn't what I expect to happen. secondObject instead is undefined.
From the socket.io client documentation it is sufficently clear that multiple parameters can be expected and should be bound to different function parameters.
This problem is driving me crazy; I don't know if this is an error of the library or if I am using it in the wrong way. Is there any one more experienced that could clarify this problem for me?