mobx-logger-fork

Mobx Logger

Usage no npm install needed!

<script type="module">
  import mobxLoggerFork from 'https://cdn.skypack.dev/mobx-logger-fork';
</script>

README

MobX Logger

Always know what is really going on in your MobX application by logging just the right information.

mobx-logger

Follow on Twitter for Updates

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