How to use the reactotron-react-native.configure function in reactotron-react-native

To help you get started, we’ve selected a few reactotron-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SkyzohKey / M-Droid / src / bootstrap / reactotron.js View on Github external
import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';

Reactotron.configure({ name: 'MDroid' }) // controls connection & communication settings
  .useReactNative() // add all built-in react native plugins
  .use(reactotronRedux())
  .connect(); // let's connect!

console.tron = Reactotron;
github rodrigotamura / go-stack-2019 / module03 / react_native_project / src / config / ReactotronConfig.js View on Github external
import Reactotron from 'reactotron-react-native';

if (__DEV__) {
  // __DEV__ is a global variable that returns true if user is emulating
  // the app in an develop environment
  // So, everything that is within this scope will not run in production environment.

  const tron = Reactotron.configure()
                  .useReactNative()
                  .connect();

  // we are getting the global variable `console` and creating new property called tron
  // so we can call this command now in order to use Reactotron for debugging tool
  console.tron = tron;

  // cleaning the timeline every moment that we refresh our application
  tron.clear();
}
github thinger-io / Mobile-App / src / config / reactotron.js View on Github external
/* eslint-disable no-console */
import Reactotron, { asyncStorage } from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
import apisaucePlugin from 'reactotron-apisauce';
import sagaPlugin from 'reactotron-redux-saga';

import Config from '.';

Reactotron.configure({
  name: 'Thinger.io',
  // host: '192.168.31.161',
})
  .useReactNative()
  .use(asyncStorage())
  .use(apisaucePlugin())
  .use(reactotronRedux())
  .use(sagaPlugin());

if (Config.useReactotron) {
  Reactotron.connect().clear();
  console.tron = Reactotron;
} else {
  console.tron = console.log;
}
github infinitered / ChainReactApp2019 / app / services / reactotron / reactotron.ts View on Github external
async setup() {
    // only run this in dev... metro bundler will ignore this block: 🎉
    if (__DEV__) {
      // configure reactotron
      Tron.configure({
        name: this.config.name || require("../../../package.json").name,
        host: this.config.host,
      })

      // hookup middleware
      Tron.useReactNative({
        asyncStorage: this.config.useAsyncStorage ? undefined : false,
      })

      Tron.use(
        mst({
          filter: event => {
            return !event.name.endsWith("@APPLY_SNAPSHOT")
          },
        }),
      )
github aerian-studios / ignite-typescript-boilerplate / boilerplate / App / Config / ReactotronConfig.ts View on Github external
import Reactotron from "reactotron-react-native";
import { reactotronRedux as reduxPlugin } from "reactotron-redux";
import sagaPlugin from "reactotron-redux-saga";
import ImmutableObject from "seamless-immutable";
import Config from "../Config/DebugConfig";

if (Config.useReactotron) {
  // https://github.com/infinitered/reactotron for more options!
  Reactotron
    .configure({ name: "Ignite App" })
    .useReactNative()
    .use(reduxPlugin({ onRestore: ImmutableObject }))
    .use(sagaPlugin())
    .connect();

  // Let's clear Reactotron on every time we load the app
  Reactotron.clear();

  // Totally hacky, but this allows you to not both importing reactotron-react-native
  // on every file.  This is just DEV mode, so no big deal.
  (console as any).tron = Reactotron;
}
github textileio / photos / App / Config / ReactotronConfig.ts View on Github external
import Config from '../Config/DebugConfig'
import { NativeModules } from 'react-native'
import Reactotron, {
  trackGlobalErrors,
  openInEditor,
  asyncStorage
} from 'reactotron-react-native'
import { reactotronRedux } from 'reactotron-redux'
import sagaPlugin from 'reactotron-redux-saga'

if (Config.useReactotron) {
  const scriptURL = NativeModules.SourceCode.scriptURL
  const scriptHostname = scriptURL.split('://')[1].split(':')[0]
  Reactotron.configure({ host: scriptHostname, name: 'Textile' })
    .use(trackGlobalErrors())
    .use(openInEditor())
    .useReactNative()
    .use(asyncStorage())
    .use(reactotronRedux())
    .use(sagaPlugin())
    .connect()
  Reactotron.clear()
}
github thiagobrez / react-native-template-pro / ReactotronConfig.js View on Github external
import Reactotron from 'reactotron-react-native';
import {reactotronRedux} from 'reactotron-redux';
import sagaPlugin from 'reactotron-redux-saga'

/**
 * Reactotron initialization.
 */
Reactotron
  .configure({name: 'HelloWorld'})
  .useReactNative()
  .use(reactotronRedux())
  .use(sagaPlugin())
  .connect();

/**
 * Clears debugger on reload.
 */
Reactotron.clear();

/**
 * Util logging functions.
 */
console.tron = Reactotron.log;
console.display = (name, value, important = false) => Reactotron.display({
github joltup / react-native-threads / examples / SimpleExample / config.js View on Github external
import Reactotron from 'reactotron-react-native'

console.tron = { log: Function.prototype };

if (__DEV__) {
  Reactotron
    .configure()
    .useReactNative()
    .connect();

  console.tron = Reactotron;
}
github dabbott / UberExercise / app / config / ReactotronConfig.js View on Github external
import Reactotron from 'reactotron-react-native'

Reactotron
  .configure()
  .connect()
github IgorMing / react-native-template-ts-boilerplate / reactotron.config.js View on Github external
import Reactotron from "reactotron-react-native";
import { name } from "./app.json";

Reactotron.configure({
  name
})
  .useReactNative()
  .connect();