Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Latest commit

 

History

History
29 lines (24 loc) · 768 Bytes

readme.md

File metadata and controls

29 lines (24 loc) · 768 Bytes

redux-websocket-middleware

build status

  • Motivation
  • Installation
  • Usage
    • Middleware
    • Action Types
    • Actions

Create actions that dispatch to a websocket. For example:

function writeToSocket(data) {
  return {
    type: "WRITE_DATA",
    payload: data,
    meta: { socket: true }
  }
}
  • Creating and opening the WebSocket for multiple endpoints (you can have one default)
  • Handling JSON encoding/decoding of messages
  • Retrying the connection when lost, and exponentially backing off
  • Batching writes when offline, and sending when available
  • Tests