saga-monitor

1.0.2 • Public • Published

saga-monitor

Simple, elegant, and configurable redux-saga monitor.

Configuration

const defaultConfig = {
  level: 'debug',             // logging level
  verbose: true,              // verbose mode
  color: '#03A9F4',           // default color
  effectTrigger: false,       // show triggered effects
  effectResolve: false,       // show resolved effects
  effectReject: false,        // show rejected effects
  effectCancel: false,        // show cancelled effects
  actionDispatch: false       // show dispatched actions
};

Usage

import createSagaMonitor from 'sagaMonitor'


// configuration
const config = {
  level: 'log',
  effectTrigger: true,
  effectResolve: true,
  actionDispatch: true
}

const middleware = [
  // create saga middleware w/ sagaMonitor
  createSagaMiddleware({
    sagaMonitor: createSagaMonitor(config)
  })
];

console output

Run $$LogSagas() in the developer console to display a snapshot of all the available sagas.

console output

Credits

This was adapted from the sagaMonitor example in the redux-saga repository.

Package Sidebar

Install

npm i saga-monitor

Weekly Downloads

16

Version

1.0.2

License

ISC

Unpacked Size

386 kB

Total Files

6

Last publish

Collaborators

  • y12.nakul.org