Skip to content

KabDino/loggerActions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

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

Param Default value Type For what
exceptions [] string[] You can add exceptions if you don't want some action log in your store
stackSize 150 number To 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published