How to use the reactotron-react-native.useReactNative 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 infinitered / ignite-bowser / boilerplate / 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,
      })

      // ignore some chatty `mobx-state-tree` actions
      const RX = /postProcessSnapshot|@APPLY_SNAPSHOT/

      // hookup mobx-state-tree middleware
      Tron.use(
        mst({
          filter: event => RX.test(event.name) === false,
        }),
      )

      // connect to the app
      Tron.connect()
github mengwangk / myInvestor / myInvestor-app / App / Config / ReactotronConfig.js View on Github external
import Config from "../Config/DebugConfig";
import Immutable from "seamless-immutable";
import Reactotron from "reactotron-react-native";
import { reactotronRedux as reduxPlugin } from "reactotron-redux";
import sagaPlugin from "reactotron-redux-saga";

if (Config.useReactotron) {
  
  console.log("connecting to reactotron");
  
  // https://github.com/infinitered/reactotron/issues/431
  // https://github.com/infinitered/reactotron for more options!
  // https://github.com/infinitered/reactotron/issues/162g
  // 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.
github infinitered / reactotron / examples / demo-react-native / App / Config / ReactotronConfig.js View on Github external
import sagaPlugin from 'reactotron-redux-saga'

console.disableYellowBox = true

// First, set some configuration settings on how to connect to the app
Reactotron.setAsyncStorageHandler(AsyncStorage)
Reactotron.configure({
  name: 'Demo App'
  // host: '10.0.1.1',
  // port: 9091
})

// 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 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 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")
          },
        }),
      )

      Tron.use(withCustomActions(() => this.rootStore))

      // connect to the app
      Tron.connect()
github infinitered / reactotron / examples / ReactotronTester / app / config / ReactotronConfig.ts View on Github external
import { Alert/*, AsyncStorage */ } from "react-native"
import AsyncStorage from "@react-native-community/async-storage"
import Reactotron from "reactotron-react-native"
import { reactotronRedux as reduxPlugin } from "reactotron-redux"
import sagaPlugin from "reactotron-redux-saga"
import { mst } from "reactotron-mst"
import { ArgType } from "reactotron-core-client"

Reactotron.configure({
  name: "Demo App",
})

Reactotron.setAsyncStorageHandler(AsyncStorage)

Reactotron.useReactNative({
  asyncStorage: {
    ignore: ["ignore-me"],
  },
})

Reactotron.use(reduxPlugin())
Reactotron.use(sagaPlugin({}))
Reactotron.use(mst())

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

Reactotron.onCustomCommand({
  command: "test2",
  handler: params => {
    Alert.alert("A message from Reactotron", params.message)
  },