socket.io-redux
socket.io-redux copied to clipboard
How do you receive messages?
trafficstars
Having all messages being dispatched as actions would be good.
Having connected and disconnected actions as well would be ideal.
@designbyadrian did you manage to implement it?
The middleware is used to emit actions, to receive messages you need to save the connection to a constant before passing it to the middleware and then use socket.on('action', store.dispatch) (or anything you want to do with the action).
I recommend you to remove the action.meta.socket key on your server to avoid the middleware emitting them again.
@sergiodxa wubba lubba dub dub 🙏💯