RemoteDev
Monitoring flux app's actions along with states to a remote monitor. Meant to be used even in production with any flux architecture for web, universal, React Native, hybrid, desktop and server side apps.
Installation
NPM
npm install --save-dev remotedev
CDN
<script src="https://unpkg.com/remotedev/dist/remotedev.min.js"></script>
Usage
import { connectViaExtension, extractState } from 'remotedev';
remotedev = connectViaExtension();
remotedev.subscribe(message => {
const state = extractState(message);
this.setState(state);
});
remotedev.send(action, state);
See the examples for different flux architectures.
Monitoring
Use one of our monitor apps to inspect and dispatch actions:
Use remotedev-app to create your own monitor app.
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.
You can import it in your server.js
script and start remotedev server together with your development server:
var remotedev = require('remotedev-server');
remotedev({ hostname: 'localhost', port: 8000 });
See remotedev-server repository for more details.
For React Native you can use remotedev-rn-debugger, which already include remotedev-server
.
License
MIT