redux-logdown

1.0.4 • Public • Published

redux-logdown


redux-logdown is a tiny logger library for Redux written with logdown that supports localStorage.debug for enabling/disabling store logging.

Installation

$ npm install --save redux-logdown

Preview

Usage

const redux = require('redux')
const reduxLogdown = require('redux-logdown')
 
// ...
 
const middleware = reduxLogdown('loremStore', { diff: true })
const store = redux.createStore(
  reducer,
  undefined,
  redux.applyMiddleware(middleware)
)

Enabling/disabling

Same rules for enabling/disabling as logdown.js.

Options

diff

  • Default: false

Enable/disable logging of previous and current state after each action.

FAQ

Why not using redux-logger?

redux-logger don't support localStorage.debug out of the box, which is the standard way to disble/enable debugging modules in the JavaScript ecosystem. So I decided to create a Redux logger that supports localStorage.debug, just like logdown and debug does.


caiogondim.com  ·  GitHub @caiogondim  ·  Twitter @caio_gondim

Readme

Keywords

none

Package Sidebar

Install

npm i redux-logdown

Weekly Downloads

60

Version

1.0.4

License

MIT

Unpacked Size

5.39 kB

Total Files

4

Last publish

Collaborators

  • caiogondim