redux-socketio
v1.1.11
Published
A redux/socketIO middleware implementation
Downloads
28
Readme
Socket.io for Redux
This module is built on top of zurfyx's implementation found (here)
Table of contents
Install
npm i -D redux-socketio
or yarn i -D redux-socketio
Usage
import Socket from './services/socketio/index.js'
import {createStore, applyMiddleware} from 'redux'
import ioMiddleware from 'redux-socketio'
const SocketClient = new Socket()
const store = createStore(
...
applyMiddleware(ioMiddleware(SocketClient))
...
)
...
export default store
// Note passing middleware as the third argument requires redux@>=3.1.0
See wiki for more details
To Do
- [ ] Write tests
- [ ] Node.js support
- [ ] React-native support
Feel free to create PR for any of those tasks!
Known issues
- Performance issues (#1)
License
MIT