Home

Awesome

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:

FAQ

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