Closed lai32290 closed 5 years ago
In my application I need to listen for event sent from server side, so I'll have to implement the .on('my_event', data => { ... }) to dispatch the event data.
.on('my_event', data => { ... })
Where should I implement it?
I just figured out that it's going to listen for "action" event.
socket.on('action', dispatch) // default behavior
In my application I need to listen for event sent from server side, so I'll have to implement the
.on('my_event', data => { ... })
to dispatch the event data.Where should I implement it?