Remote Redux DevTools
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 enhancer = compose(
applyMiddleware(thunk),
devTools()
);
return createStore(reducer, initialState, enhancer);
}
Remote monitoring
Use one of our monitor apps to inspect and redo actions:
The source code is here.
It also included in following projects:
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. |
filters | Map of arrays named whitelist or blacklist to filter action types. |
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) {
return createStore(
rootReducer,
initialState,
devTools({ hostname: 'localhost', port: 8000, name: 'Android app', filters: { blacklist: ['EFFECT_RESOLVED'] }})
);
}
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