0.0.5 • Published 1 year ago

@nicholaskuchiniski/mobx-debugger v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Native Logs

See your logs from React Native on Flipper.

Usage

First you need to install the react-native library with yarn mobx-debugger or npm i mobx-debugger, after that you just need to configure the logger before using it:

import { configureLogger } from "mobx-debugger";

configureLogger({
  isEnabled: __DEV__
});

After configuring the logger, you can use it by creating a new instance of Logger anywhere in your app:

import { Logger } from "mobx-debugger";
import { interval } from  "rxjs";

const pair = new Logger("pair");
const odd = new Logger("odd");

interval(1_000).subscribe(number => {
    number % 2 === 0
      ? pair.info('Number is pair', { number })
      : odd.warn('Number is odd', { number });
});

And you will be able to see the logs appearing once you have Flipper open (Go to Releases to download the plugin):

Example

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago