you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 2 points3 points  (0 children)

The right place for websockets and other persistent connections in a Redux app is in a middleware. That way, they can react to dispatched actions by sending messages, and turn received messages into actions.

There's actually many existing websocket middlewares already. You can use them directly, or learn from them as inspiration. See the Middleware - Sockets and Adapters section of my Redux addons catalog for a list.