Skip to content

cape-io/cape-redux-socket

Repository files navigation

cape-redux-socket

Build Status

Configure store

import io from 'socket.io-client'
import {
  addCookieMeta, cookieMiddleware, middleware as createSocketMiddleware
} from 'cape-redux-socket'
const location = process.env.SOCKET_LOC || ''
const socket = createSocketMiddleware(io(location), { getEmitAction: addCookieMeta })
const middleware = [
  cookieMiddleware,
  socket,
]

Reducer

export socket, { idReducer as id } from 'cape-redux-socket'

About

Socket middleware, reducer, actions, constants

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published