socket.on('server-update', function(server) {
// do something with the updated server info
// maybe dispatch a thunk action?
});
right now i have things like ...
socket.on('connected', function () {
// dispatch(socket.connected(socketId)
// console.log('connected to backend')
});
socket.on('disconnected', function () {
// dispatch(socket.connected(socketId)
// console.log('connected to backend')
});
in my store/socket.js
file and i call socket.connect()
in my appcontainer.js onMount()
socket.emit('channelname', { // some data })