How to use the reactotron-react-native.trackGlobalErrors 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 btomashvili / react-redux-firebase-boilerplate / src / app / Config / ReactotronConfig.js View on Github external
/* eslint-disable no-undef */

const Reactotron = require('reactotron-react-native').default;
const errorPlugin = require('reactotron-react-native').trackGlobalErrors;
const apisaucePlugin = require('reactotron-apisauce');

if (__DEV__) {
    Reactotron
    .configure({
      // host: '10.0.3.2' // default is localhost (on android don't forget to `adb reverse tcp:9090 tcp:9090`)
        name: 'Ignite App', // would you like to see your app's name?
    })

    // forward all errors to Reactotron
    .use(errorPlugin({
      // ignore all error frames from react-native (for example)
        veto: frame =>
        frame.fileName.indexOf('/node_modules/react-native/') >= 0,
    }))

    // register apisauce so we can install a monitor later
    .use(apisaucePlugin())

    // let's connect!
    .connect();

    // 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.tron = Reactotron;
} else {
  // a mock version should you decide to leave console.tron in your codebase
github infinitered / ignite / packages / ignite-ir-boilerplate / boilerplate / App / Config / ReactotronConfig.js View on Github external
import Immutable from 'seamless-immutable'
const Reactotron = require('reactotron-react-native').default
const errorPlugin = require('reactotron-react-native').trackGlobalErrors
const apisaucePlugin = require('reactotron-apisauce')
const { reactotronRedux } = require('reactotron-redux')
const sagaPlugin = require('reactotron-redux-saga')

if (Config.useReactotron) {
  Reactotron
    .configure({
      // host: '10.0.3.2' // default is localhost (on android don't forget to `adb reverse tcp:9090 tcp:9090`)
      name: 'Ignite App' // would you like to see your app's name?
    })

    // forward all errors to Reactotron
    .use(errorPlugin({
      // ignore all error frames from react-native (for example)
      veto: (frame) =>
        frame.fileName.indexOf('/node_modules/react-native/') >= 0
    }))

    // register apisauce so we can install a monitor later
    .use(apisaucePlugin())

    // setup the redux integration with Reactotron
    .use(reactotronRedux({
      // you can flag some of your actions as important by returning true here
      isActionImportant: action => action.type === StartupTypes.STARTUP,

      // you can flag to exclude certain types too... especially the chatty ones
      // except: ['EFFECT_TRIGGERED', 'EFFECT_RESOLVED', 'EFFECT_REJECTED', 'persist/REHYDRATE'],
github infinitered / ignite / ignite-base / App / Config / ReactotronConfig.js View on Github external
import Immutable from 'seamless-immutable'
const Reactotron = require('reactotron-react-native').default
const errorPlugin = require('reactotron-react-native').trackGlobalErrors
const apisaucePlugin = require('reactotron-apisauce')
const { reactotronRedux } = require('reactotron-redux')
const sagaPlugin = require('reactotron-redux-saga')

if (Config.useReactotron) {
  Reactotron
    .configure({
      // host: '10.0.3.2' // default is localhost (on android don't forget to `adb reverse tcp:9090 tcp:9090`)
      name: 'Ignite App' // would you like to see your app's name?
    })

    // forward all errors to Reactotron
    .use(errorPlugin({
      // ignore all error frames from react-native (for example)
      veto: (frame) =>
        frame.fileName.indexOf('/node_modules/react-native/') >= 0
    }))

    // register apisauce so we can install a monitor later
    .use(apisaucePlugin())

    // setup the redux integration with Reactotron
    .use(reactotronRedux({
      // you can flag some of your actions as important by returning true here
      isActionImportant: action => action.type === StartupTypes.STARTUP,

      // you can flag to exclude certain types too... especially the chatty ones
      // except: ['EFFECT_TRIGGERED', 'EFFECT_RESOLVED', 'EFFECT_REJECTED', 'persist/REHYDRATE'],
github forest-watcher / forest-watcher / app / store.js View on Github external
import { combinedReducer } from 'combinedReducer';
import offline from 'offline';
import thunk from 'redux-thunk';
import createSagaMiddleware from 'redux-saga';

import Reactotron, { trackGlobalErrors, networking, openInEditor, asyncStorage } from 'reactotron-react-native'; // eslint-disable-line
import sagaPlugin from 'reactotron-redux-saga';// eslint-disable-line
import { reactotronRedux } from 'reactotron-redux'; // eslint-disable-line

import { rootSaga } from 'sagas';

if (__DEV__) {
  Reactotron.configure()
    .use(reactotronRedux())
    .use(sagaPlugin())
    .use(trackGlobalErrors())
    .use(networking())
    .use(openInEditor())
    .use(asyncStorage())
    .connect()
    .clear();
  window.tron = Reactotron; // eslint-disable-line
}

const sagaMonitor = __DEV__ && Reactotron.createSagaMonitor();
const sagaMiddleware = createSagaMiddleware({ sagaMonitor });

const authMiddleware = ({ getState }) => next => action =>
  action && action.type && action.type.endsWith('REQUEST')
    ? next({ ...action, auth: getState().user.token })
    : next(action);
github easemob / webim-react-native / App / Config / ReactotronConfig.js View on Github external
import { StartupTypes } from '../Redux/StartupRedux'
import Immutable from 'seamless-immutable'
const Reactotron = require('reactotron-react-native').default
const errorPlugin = require('reactotron-react-native').trackGlobalErrors
const apisaucePlugin = require('reactotron-apisauce')
const { reactotronRedux } = require('reactotron-redux')

if (__DEV__) {
  Reactotron
    .configure({
      // host: '10.0.3.2' // default is localhost (on android don't forget to `adb reverse tcp:9090 tcp:9090`)
      name: 'Ignite App' // would you like to see your app's name?
    })

    // forward all errors to Reactotron
    .use(errorPlugin({
      // ignore all error frames from react-native (for example)
      veto: (frame) =>
        frame.fileName.indexOf('/node_modules/react-native/') >= 0
    }))

    // register apisauce so we can install a monitor later
    .use(apisaucePlugin())

    // setup the redux integration with Reactotron
    .use(reactotronRedux({
      // you can flag some of your actions as important by returning true here
      isActionImportant: action => action.type === StartupTypes.STARTUP,

      // you can flag to exclude certain types too... especially the chatty ones
      // except: ['EFFECT_TRIGGERED', 'EFFECT_RESOLVED', 'EFFECT_REJECTED', 'persist/REHYDRATE'],
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 pillarwallet / pillarwallet / reactotron.config.js View on Github external
const Reactotron = require('reactotron-react-native').default;

    const {
      trackGlobalErrors,
      openInEditor,
      overlay,
      networking,
    } = require('reactotron-react-native');

    const { reactotronRedux } = require('reactotron-redux');

    Reactotron.configure({
      name: 'PillarWallet',
      enabled: true,
    })
      .use(trackGlobalErrors())
      .use(openInEditor())
      .use(overlay())
      .use(reactotronRedux())
      .use(networking())
      .connect();

    Reactotron.clear();

    global.Reactotron = Reactotron;
  }
};