redux-doctor

0.0.2 • Public • Published

redux-doctor

See at glance flow of application logic in your redux application.

This helps with debugging of redux applications in opinionated way.

As of 0.0.1 only webpack with chrome is supported.

Features:

  • Define which path in Redux store you want to observe for changes...
createPathsObserveMiddleware = require("redux-doctor").createPathsObserveMiddleware

let pathsToObserve = [
  "foo", "hello.there" // edit as needed
]

let middleware = createPathsObserveMiddleware(pathsToObserve)

// apply this middleware to your redux store

...and see a nice diff whenever change happens :)

green - added, orange/blue - modified, red - removed

  • Add actions logger to your action creators ...
// some_actions.js

let myActionCreators = {
  foo() { ... },
  bar() { ... }
}

let decorated = require("redux-doctor").ActionsLogger(myActionCreators, "SomeActions")

export default decorated;

and see a nice dispatch stack trace of called action creators (flow of logic)

NOTE1: your file with action creators should contain "_actions" string in its name. NOTE2: look how finding module name (filename) is defined in `getModule()`` in config.js, override it according to your needs

TODO:

  • [ ] Drop lodash dependency
  • [ ] Better configuration
  • [ ] Better support for other browsers
  • [ ] ? - please suggest any ideas in issues

Package Sidebar

Install

npm i redux-doctor

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • machiaweliczny