1.0.3 • Published 9 years ago

redux-debug v1.0.3

Weekly downloads
76
License
-
Repository
github
Last release
9 years ago

redux-debug

debug() as redux middleware. Similar to redux-logger, but works both on the server and in the client.

img

Installation

npm install redux-debug

Usage

var Debug = require('redux-debug')
var debug = require('debug')('redux')

var Store = Redux.compose(
  Redux.applyMiddleware(Debug(debug))
)(Redux.createStore)

API

Debug(fn, options)

This fn is usually a debug instance but can be any sprintf-compatible function.

Redux.applyMiddleware(Debug(console.log))

Available options include:

  • collapsed (default: false): Collapse the state transitions

FAQ

  • My logs aren't showing up!

If you're using debug, you'll need to pass the DEBUG=... environment variable. If you're in the browser, you'll need to set localStorage.DEBUG='...'.

License

MIT