Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
grapewheel opened this issue Nov 4, 2017 · 1 comment

Comments

@grapewheel
Copy link

grapewheel commented Nov 4, 2017

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!

@blazeroot
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants