mobx-logger-fork
v0.4.0
Published
Mobx Logger
Downloads
2
Maintainers
Readme
MobX Logger
Always know what is really going on in your MobX application by logging just the right information.
Install
NPM: npm install mobx-logger
CDN: https://unpkg.com/mobx-logger/mobx-logger.umd.js
Usage
import {enableLogging} from 'mobx-logger';
// optional
const config = {...};
enableLogging(config);
Options
Unlike MobX DevTools you can simply configure which particular information should be logged to the console. Currently Actions, Reactions, Transactions and Computations are supported.
{
predicate: () => true|false,
action: true|false,
reaction: true|false,
transaction: true|false,
compute: true|false
}
ReactNative
For ReactNative development use this predicate to only enable logging in dev mode with JS debugging enabled:
enableLogging({
predicate: () => __DEV__ && Boolean(window.navigator.userAgent),
...
});
License
MIT