redux-via-socket.io
redux-via Socket.IO adapter.
Usage
npm install --save redux-via-socket.io
Client side
;;// ...const socket = ; // socket.io client initialization const finalCreateStore = createStore; const store = ; // initialize for incoming actions;
Server side
;;// ...const server = ...; // socket.io server initialization const finalCreateStore = createStore; const store = ; // initialize for incoming actions;
You can also tweak the incoming actions before dispatch them using socket metadata. For example, if you're using something like passport.socketio:
;
Meta options
Action flow is controlled by options specified in the meta
property.
License
MIT