All Projects → PlatziDev → Socket.io Redux

PlatziDev / Socket.io Redux

Redux middleware to emit action via socket.io

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Socket.io Redux

chattt-backend
🖥 Backend for chattt
Stars: ✭ 17 (-83.5%)
Mutual labels:  socket, socket-io
Socket.io
NodeJS《你画我猜》游戏
Stars: ✭ 255 (+147.57%)
Mutual labels:  socket, socket-io
video-group-meeting
WebRTC video chat for multi users using React and Node Express.
Stars: ✭ 40 (-61.17%)
Mutual labels:  socket, socket-io
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (-34.95%)
Mutual labels:  socket, socket-io
Peeplus
python+vue3前后端分离项目
Stars: ✭ 28 (-72.82%)
Mutual labels:  socket, socket-io
TweetMigration
A WebGL heatmap of global Twitter activity
Stars: ✭ 42 (-59.22%)
Mutual labels:  socket, socket-io
socket-chat
This project will help you build a chat app by using the Socket IO library.
Stars: ✭ 36 (-65.05%)
Mutual labels:  socket, socket-io
express-boilerplate
ExpressJS boilerplate with Socket.IO, Mongoose for scalable projects.
Stars: ✭ 83 (-19.42%)
Mutual labels:  socket, socket-io
Dodgem
A Simple Multiplayer Game, built with Mage Game Engine.
Stars: ✭ 12 (-88.35%)
Mutual labels:  socket, socket-io
Angular Contacts App Example
Full Stack Angular PWA example app with NgRx & NestJS
Stars: ✭ 570 (+453.4%)
Mutual labels:  socket, socket-io
video-chat
Simple Web Application that offer you to create video meeting room using WebRTC and Socket.
Stars: ✭ 32 (-68.93%)
Mutual labels:  socket, socket-io
Chatter
A chatting app using socket.io
Stars: ✭ 53 (-48.54%)
Mutual labels:  socket, socket-io
SocketIOUnity
A Wrapper for socket.io-client-csharp to work with Unity.
Stars: ✭ 69 (-33.01%)
Mutual labels:  socket, socket-io
react-webrtc-chat
React WebRTC chat
Stars: ✭ 39 (-62.14%)
Mutual labels:  socket, socket-io
ExpressJS-SocketIO-Boilerplate
📦 Simple Express.js & Socket.io Boilerplate
Stars: ✭ 31 (-69.9%)
Mutual labels:  socket, socket-io
ddos
Simple dos attack utility
Stars: ✭ 36 (-65.05%)
Mutual labels:  socket, socket-io
vue3-chat
2021👨‍🎓Vue2/3全家桶 + Koa+Socket+Vant3前后端分离移动端聊天应用。vue+node全栈入门项目
Stars: ✭ 46 (-55.34%)
Mutual labels:  socket, socket-io
CleanArchitecture-SocketIO
CleanArchitecture with SocketIo 📡
Stars: ✭ 32 (-68.93%)
Mutual labels:  socket, socket-io
Bizsocket
异步socket,对一些业务场景做了支持
Stars: ✭ 469 (+355.34%)
Mutual labels:  socket, socket-io
Progress Bot
High-tech weaponized moe progress delivery bot for IRC, Discord, and web
Stars: ✭ 38 (-63.11%)
Mutual labels:  socket, socket-io

socket.io-redux

Redux middleware to emit actions to a socket.io server

API

Apply middleware

import io from 'socket.io-client';
import { createStore, applyMiddleware } from 'redux';

import socketIO from 'socket.io-redux';

import reducer from './reducer';

const store = createStore(reducer, applyMiddleware(
  socketIO(io.connect(process.env.SOCKET_URL))
));
  • socketIO receive a socket instance created by io.connect(<url>).

Example action

const action = {
  type: 'ADD_TODO',
  payload: {
    message: 'Use socket.io-redux middleware',
  },
  meta: {
    socket: {
      channel: 'add:todo',
      namespace: 'ns',
      room: 'room',
    },
  },
};
  • meta.socket.channel define the socket.io channel to use to emit the action.
  • meta.socket.namespace (optional) use the given namespace, instead of the default, to emit the action.
  • meta.socket.room (optional) emit the action to the given room, instead of a global broadcast.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].