Redux middleware for showing another user's interaction with your application in your browser using [PubNub] (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.
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)
);
Users wishing to show their interactions with the application should add ?sender=true to the application url
http://your.app.com?sender=true
Users wishing to see another user's interactions with the application should add add ?receiver=true to the application url
http://your.app.com?receiver=true
$ npm install redux-publish-action
[PbNub] (https://www.pubnub.com) account with publish and subscribe keys.
todos app from Redux examples page with redux-publish-action
.
$ git clone git@github.com:oriweingart/redux-publish-action.git
$ cd redux-publish-action
$ npm install
$ cd examples/todos
$ npm install
$ npm start
Open the sender browser on
http://localhost:3000?sender=true
Open the receiver browser on
http://localhost:3000?receiver=true
All UI interactions performed by the sender will be displayed in the receiver's browser.
Apache.