1.3.2 • Published 5 years ago

wtc-sub-middleware v1.3.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

We The Curious actions middleware

This is a piece of middleware used in react redux app to pass actions to a broker via MQTT.

How to use:

import { createMQTTMiddleware } from 'wtc-sub-middleware'
createMQTTMiddleware('http://localhost:1884', '--origin--')

Origin is an optional parameter that gets added to final published output

Accepts a url parameter, publishes current action, and then passes that same action back into the store.

By default subscribed to all actions, can be changed to subscribe to specific list of action like so:

client.subscribe(['BUTTON_PRESS', 'TOGGLE_SWITCH'])

Some basic error catchers. Looks for a broker connection every 10s.

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago