GithubHelp home page GithubHelp logo

gaearon / remote-redux-devtools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zalmoxisus/remote-redux-devtools

3.0 2.0 1.0 204.37 MB

Use Redux DevTools remotely for React Native, hybrid, desktop and server side Redux apps.

License: MIT License

JavaScript 100.00%

remote-redux-devtools's Introduction

Remote Redux DevTools

Demo

Use Redux DevTools remotely for React Native, hybrid, desktop and server side Redux apps.

Installation

npm install --save-dev remote-redux-devtools

Usage

Just add our store enhancer to your store:

store/configureStore.js
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import devTools from 'remote-redux-devtools';
import reducer from '../reducers';

export default function configureStore(initialState) {
  const finalCreateStore = compose(
    applyMiddleware(thunk),
    devTools()
  )(createStore);

  const store = finalCreateStore(reducer, initialState);

  return store;
}

Remote monitoring

Use one of our monitor apps to inspect and redo actions:

The source code is here.

Also, it can be used in React Native debugger as a dock monitor.

Communicate via local server

In order to make it simple to use, by default, the module and the monitor app communicate via remotedev.io server. Use remotedev-server cli to run it locally in order to make the connection faster and not to require an internet connection.

Parameters

Name Description
name Instance name to be showed in the app.
hostname If port is specified, default value is localhost.
port Local host's port.

All props are optional. You have to provide at least port property to use localhost instead of remotedev.io server.

Example:

export default function configureStore(initialState) {
  const finalCreateStore = compose(
    devTools({ hostname: 'localhost', port: 8000, name: 'Android app' })
  )(createStore);

  const store = finalCreateStore(rootReducer, initialState);
  return store;
}

Examples

Limitations

  • Use it only for development, NOT in production!
  • The app and the monitor should be under the same external IP address.
  • For web apps it's easier and way faster to use Chrome extension instead. The remote monitoring is meant to be used for React Native, hybrid, desktop and server side apps.

License

MIT

remote-redux-devtools's People

Contributors

jhen0409 avatar mlabrum avatar zalmoxisus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rubythonode

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.