Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.08 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.08 KB

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