itaylor / redux-socket.io

An opinionated connector between socket.io and redux
410 stars 53 forks source link

how to manage the connection? #36

Closed eeeman1 closed 6 years ago

eeeman1 commented 6 years ago

Hi, How to disable listening to a specific event. Or how to close/reopen the connection? Where is the normal documentation?

itaylor commented 6 years ago

If you mean the socket.io documentation, it's at https://socket.io/docs. This library, redux-socket.io is tiny and is focused on only on providing an interface between socket.io and Redux dispatch. All of the socket.io documentation still applies.

Following the examples in the readme.md, there is only one socket.io event being listened for. By default it's called 'action', but you can pass the eventName parameter if you prefer something else. Since there's only one event, I don't understand the use-case for disabling listening for it.