rematch-logger-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Logger Plugin for Rematch

Install

npm i --save rematch-logger-plugin

Usage

// Logger with default options
import rematchLogger from 'rematch-logger-plugin';
import { init } from '@rematch/core';

const store = init({
    name: 'xxx',
    plugins: [rematchLogger()],
    models: {
      // ...models
    }
})

Also, You can config some custom options

import rematchLogger from 'rematch-logger-plugin';
import { init } from '@rematch/core';

const logger = rematchLogger({
  // ...options
});

const store = init({
    name: 'xxx',
    plugins: [logger],
    models: {
      // ...models
    }
})

Options

{
  enable = true: Boolean, // enable print feature?
  duration = true: Boolean, // print the duration?
  timestamp = true: Boolean, // print the timestamp?
  effects = false: Boolean, //  print the effects actions?
}

Please look forward to more features...

Readme

Keywords

Package Sidebar

Install

npm i rematch-logger-plugin

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

48.4 kB

Total Files

14

Last publish

Collaborators

  • hezhuoyi