Code Monkey home page Code Monkey logo

redux-publish-action's Introduction

redux-publish-action Circle CI

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.

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)
);

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

Installation

$ npm install redux-publish-action

Requirements

[PbNub] (https://www.pubnub.com) account with publish and subscribe keys.

Examples

todos app from Redux examples page with redux-publish-action.

$ git clone [email protected]: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.

License

Apache.

redux-publish-action's People

Contributors

oriweingart avatar

Watchers

James Cloos avatar Mayur Panchal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.