2.0.0 • Published 8 months ago

socket-redux-middleware v2.0.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Socket Redux Middleware

Installation

npm install socket-redux-middleware
yarn add socket-redux-middleware

Usage

import { createStore, applyMiddleware, compose} from 'redux';
import socketReduxMiddleware from "socket-redux-middleware"; 
import io from 'socket.io-client';
let socket = io('http://localhost:3000');
let socketMiddleware = socketReduxMiddleware(socket, "server/");
const middlewares = [...,socketMiddleware]
const store = createStore(
  ...,
compose(
  applyMiddleware(...middlewares)
)
)

Now you will receive and send socket events through redux action and dispatch.

1.0.2

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

2.0.0

8 months ago

1.0.1

11 months ago

1.0.0

12 months ago