2.0.2 • Published 2 years ago

logger-actions v2.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Logger actions

This is the package provides middleware for logging actions using Redux

Installation

npm install logger-actions

Usage

To use the package you need

  • To add loggerActionsMiddleware() from logger-actions in your middleware.
  • To add loggerActions from logger-actions to combineReducers

Params

loggerActionsMiddleware() takes 2 optional parameters

ParamDefault valueTypeFor what
exceptions[]string[]You can add exceptions if you don't want some action log in your store
stackSize150numberTo prevent the stack from overflowing with actions, we added a limit of 150 elements. You can change this restriction with the second parameter

For example

loggerActionsMiddleware(['APP/SHOW_LOADING', 'APP/HIDE_LOADING'])
loggerActionsMiddleware(['APP/SHOW_LOADING', 'APP/HIDE_LOADING'], 100)
loggerActionsMiddleware([], 50)
loggerActionsMiddleware()

Now you can see loggerActions in your state tree