# redux-mw-ws

> Declarative native websockets for Redux

Latest version **1.2.3** (published 2018-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install redux-mw-ws
pnpm add redux-mw-ws
yarn add redux-mw-ws
bun add redux-mw-ws
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2018-03-22 |
| First published | 2018-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 20.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Giorgi Bagdavadze/ Erik Rudisch |
| Maintainers | erudisch |
| Keywords | redux, websocket, middleware, action |

## Links

- npm: https://www.npmjs.com/package/redux-mw-ws
- npm.io page: https://npm.io/package/redux-mw-ws

## Dependencies (2)

- [backoff](https://npm.io/package/backoff.md) ^2.5.0
- [lodash.isequal](https://npm.io/package/lodash.isequal.md) ^4.5.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.2.3 (latest) — 2018-03-22
- 1.2.2 — 2018-03-22
- 1.2.1 — 2018-03-22
- 1.2.0 — 2018-03-21
- 1.1.0 — 2018-03-21

## README

redux-websocket-middleware
==========================

[![build status](https://travis-ci.org/notgiorgi/redux-websocket-middleware.svg?branch=master)](https://travis-ci.org/notgiorgi/redux-websocket-middleware)

- Motivation
- Installation
- Usage
  - Middleware
  - Action Types
  - Actions

Create actions that dispatch to a websocket. For example:

```js
function writeToSocket(data) {
  return {
    type: "WRITE_DATA",
    payload: data,
    meta: { socket: true }
  }
}
```

- [x] Creating and opening the WebSocket for multiple endpoints (you can have one default)
- [x] Handling JSON encoding/decoding of messages
- [x] Retrying the connection when lost, and exponentially backing off
- [x] Batching writes when offline, and sending when available
- [ ] Tests

---
_Source: https://npm.io/package/redux-mw-ws · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
