How to use the reactotron-react-native.clear 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.

github RocketChat / Rocket.Chat.ReactNative / app / ReactotronConfig.js View on Github external
import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
import sagaPlugin from 'reactotron-redux-saga'

if (__DEV__) {
    const scriptURL = NativeModules.SourceCode.scriptURL;
    const scriptHostname = scriptURL.split('://')[1].split(':')[0];
    Reactotron
        .configure({ host: scriptHostname })
        .useReactNative()
        .use(reactotronRedux())
        .use(sagaPlugin())
        .connect();
    // Running on android device
    // $ adb reverse tcp:9090 tcp:9090
    Reactotron.clear();
    console.warn = Reactotron.log;
    console.log = Reactotron.log;
    console.disableYellowBox = true;
}
github infinitered / ChainReactApp2017 / App / Config / ReactotronConfig.js View on Github external
import sagaPlugin from 'reactotron-redux-saga'

  // https://github.com/infinitered/reactotron for more options!
Reactotron
  .configure({ name: 'Chain React App' })
  .useReactNative()
  .use(reduxPlugin({ onRestore: Immutable }))
  // register the redux-saga plugin so we can use the monitor in CreateStore.js
  .use(sagaPlugin())

if (Config.useReactotron) {
  // let's connect!
  Reactotron.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.tron = Reactotron
github ruddell / ignite-jhipster / boilerplate / app / config / reactotron-config.js View on Github external
import Config from './debug-config'

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 JHipster App' // would you like to see your app's name?,
    })
    .setAsyncStorageHandler(AsyncStorage)
    .useReactNative({ asyncStorage: false })
    .use(reduxPlugin({ onRestore: Immutable }))
    .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.tron = Reactotron
} else {
  const noop = () => undefined
  // attach a mock so if things sneaky by our __DEV__ guards, we won't crash.
  console.tron = {
    configure: noop,
    connect: noop,
    use: noop,
    useReactNative: noop,
    clear: noop,
    log: noop,
    logImportant: noop,
    display: noop,
github mengwangk / myInvestor / myInvestor-app / App / Config / ReactotronConfig.js View on Github external
// Reactotron.configure({  host: 'localhost', name: "myInvestor" })
  // Do adb reverse tcp:9090 tcp:9090
  Reactotron
    .useReactNative()
    .use(reduxPlugin({ onRestore: Immutable }))
    .use(sagaPlugin())
    .connect(
      { 
        enabled: true,
        host: 'localhost',
        port:9090
      }
    );

  // 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.tron = Reactotron;
}
github infinitered / ignite-bowser / boilerplate / app / services / reactotron / reactotron.ts View on Github external
},
      })

      Tron.onCustomCommand({
        title: "Reset Navigation Store",
        description: "Resets the navigation store",
        command: "resetNavigation",
        handler: () => {
          console.tron.log("resetting navigation store")
          this.rootStore.navigationStore.reset()
        },
      })

      // clear if we should
      if (this.config.clearOnLoad) {
        Tron.clear()
      }
    }
  }
}
github infinitered / reactotron / examples / demo-react-native / App / Config / ReactotronConfig.js View on Github external
// add every built-in react native feature.  you also have the ability to pass
// an object as a parameter to configure each individual react-native plugin
// if you'd like.
Reactotron.useReactNative({
  asyncStorage: { ignore: ['secret'] }
})

// add some more plugins for redux & redux-saga
Reactotron.use(reduxPlugin())
Reactotron.use(sagaPlugin())

// if we're running in DEV mode, then let's connect!
if (__DEV__) {
  Reactotron.connect()
  Reactotron.clear()
}

Reactotron.onCustomCommand('test', () => console.tron.log('This is an example'))

console.tron = Reactotron
github tomcastro / react-native-template-goatlab / App / Config / ReactotronConfig.ts View on Github external
import { DEV_SERVER_IP } from 'react-native-dotenv'
import Reactotron, { asyncStorage } from 'reactotron-react-native'
import { reactotronRedux as reduxPlugin } from 'reactotron-redux'
import sagaPlugin from 'reactotron-redux-saga'
import Immutable from 'seamless-immutable'

Reactotron.configure({ host: DEV_SERVER_IP }) // controls connection & communication settings
  .useReactNative({}) // add all built-in react native plugins
  .use(asyncStorage({}))
  .use(reduxPlugin({ onRestore: Immutable }))
  .use(sagaPlugin({}))
  .connect() // let's connect!

if (Reactotron.clear) {
  Reactotron.clear()
}

global.console.tron = Reactotron
github echobind / react-native-template / src / config / reactotron / reactotron.ts View on Github external
public async setup() {
    if (__DEV__) {
      Tron.configure({
        name: require('../../../package.json').name,
        host: 'localhost',
      });

      // hookup middleware
      Tron.useReactNative({
        storybook: true
      });

      Tron.connect();
      Tron.clear();
    }
  }
}
github textileio / photos / App / Config / ReactotronConfig.ts View on Github external
} 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 infinitered / reactotron / examples / ReactotronTester / app / config / ReactotronConfig.ts View on Github external
{
      name: "message",
      type: ArgType.String,
    },
  ],
})

const selfRemoving = Reactotron.onCustomCommand({
  command: "remove",
  handler: () => {
    selfRemoving()
  },
})

Reactotron.connect()
Reactotron.clear()

const aThing = {
  aFunc: () => {
    return 10
  },
  aVal: "Test",
  aObj: {
    nested: true,
    num: 12312314,
  },
  aArr: [1, "two", { three: true }],
}

Reactotron.repl("thing", aThing)

Reactotron.repl("aString", "Hello")