Skip to content
Simple logger with stores inspector
TypeScript JavaScript HTML
Branch: master
Clone or download

README.md

Effector Logger

All Contributors

Chrome-DevTools-Console
Chrome-DevTools-Console-Dark

Installation

npm install effector
npm install --dev effector-logger

or yarn

yarn add effector
yarn add -D effector-logger

effector-logger requires effector to be installed

Usage

Add babel plugin to your babel.config.js or .babelrc file

babel-plugin included to effector package

{
  "plugins": [["effector/babel-plugin", { "addLoc": true }]]
}

Debug some modules

  1. Open a module (js/ts/esm file) you need to debug

Replace import from "effector" to "effector-logger"

For example:

- import { Event, Store, createEvent, forward } from "effector"
+ import { Event, Store, createEvent, forward } from "effector-logger"
  1. Open DevTools Console, use "Filter" to show only required logs

Debug domain

  1. Open a module with domain
  2. import { attachLogger } from 'effector-logger/attach'
  3. Attach logger to your domain

Example:

import { createDomain } from 'effector';
import { attachLogger } from 'effector-logger/attach';

export const myDomain = createDomain('my');
attachLogger(myDomain);

Inspector

Just follow effector-inspector instructions.

Redux DevTools support

If you have redux devtools extensions, just open it.

Contributors

Thanks goes to these wonderful people (emoji key):


Andrey Antropov

💻

Sergey Sova

💻

Sozonov

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

You can’t perform that action at this time.