redux-socket.io icon indicating copy to clipboard operation
redux-socket.io copied to clipboard

How can I changed the "catchable" server emit EVENT NAME in the plugin?

Open grapewheel opened this issue 8 years ago • 1 comments

It seems the socket.io server emit to client 's event name must be "action", like this: Server: socket.emit('action', {type:'message', data:'good day!'});

or the plugin can't catch the server event and reduxed it

How can I changed the "catchable" EVENT NAME ? The { execute: optimisticExecute } can only changed the client emit event name

Ask for hurry, I'm ready to use the plugin in the production!

grapewheel avatar Nov 04 '17 03:11 grapewheel

I think you'd want to pass eventName parameter to the createSocketIoMiddleware.

See: https://github.com/itaylor/redux-socket.io/blob/master/src/index.js#L15

blazeroot avatar Nov 21 '17 20:11 blazeroot