redux-socketio

1.1.11 • Public • Published

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

Package Sidebar

Install

npm i redux-socketio

Weekly Downloads

19

Version

1.1.11

License

ISC

Last publish

Collaborators

  • pak11273