redux-publish-action
v1.0.1
Published
Publish redux actions using PubNub
Downloads
3
Maintainers
Readme
redux-publish-action
Redux middleware for simulating user's interaction in other user's browser using [PbNub] (https://www.pubnub.com).
Using this middleware you can see what your users see in their application or you can show them what you see on your end. Useful for demos and debug sessions.
Usage
import { createStore, applyMiddleware } from 'redux';
import publishAction from 'redux-publish-action';
// Add PubNub publish and subscribe keys
let publishActionMiddleware = publishAction('pub-key-123', 'sub-key-123');
const store = createStore(
yourApp,
applyMiddleware(publishActionMiddleware)
);
For user that present his interaction - add ?sender=true to the application url
http://your.app.com?sender=true
For users that receive the intercations from the sender - add ?receiver=true to the application url
http://your.app.com?receiver=true
Installation
$ npm install redux-publish-action
Requirements
[PbNub] (https://www.pubnub.com) account with publish and subscribe keys.
License
Apache.