diff --git a/README.md b/README.md index b001dfd4..34111614 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,44 @@ A live-editing time travel environment for [Redux](https://github.com/rackt/redu npm install --save-dev redux-devtools ``` +DevTools is a store enhancer, which should be added to your middleware stack *after* `applyMiddleware` as `applyMiddleware` is potentially asynchronous. Otherwise, DevTools won't see the raw actions emitted by the Promise store enhancer etc. + +To install, firstly import `devTools` into your App container: +``` +import { devTools, persistState } from 'redux-devtools'; +import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'; +``` + +Then, add `devTools` to your middleware, and create your store: +``` +const finalCreateStore = compose( + applyMiddleware(thunk), + devTools(), + persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)), + createStore +); + +const store = finalCreateStore(reducer); +``` + +Lastly, include the `DebugPanel` in your page: +``` +export default class App extends Component { + render() { + return ( +