How to use the reactotron-react-native.display 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 echobind / react-native-template / src / config / reactotron / reactotron.ts View on Github external
public setRootStore(rootStore: any, initialData: any) {
    if (__DEV__) {
      // this.rootStore = rootStore as RootStoreType;
      const name = 'ROOT STORE';

      Tron.display({
        name,
        value: initialData,
        preview: 'Initial State',
      });

      // onSnapshot(rootStore, snapshot => {
      //   Tron.display({ name, value: snapshot, preview: 'New State' });
      // });

      // tslint:disable-next-line
      // (console.tron as ReactotronWithPlugins).trackMstNode(rootStore);
    }
  }
github aerian-studios / ignite-typescript-boilerplate / boilerplate / App / Sagas / StartupSagas / index.ts View on Github external
export function * startup(action?: Action): SagaIterator {
  if (__DEV__) {
    // straight-up string logging
    Reactotron.log("Hello, I'm an example of how to log via Reactotron.");
    Reactotron.log(action);
    // logging an object for better clarity
    Reactotron.log({
      message: "pass objects for better logging",
      someGeneratorFunction: selectAvatar,
    });

    // fully customized!
    const subObject = { a: 1, b: [1, 2, 3], c: true, circularDependency: undefined as any};
    subObject.circularDependency = subObject; // osnap!
    Reactotron.display({
      name: "🔥 IGNITE 🔥",
      preview: "You should totally expand this",
      value: {
        "💃": "Welcome to the future!",
        subObject,
        "someInlineFunction": () => true,
        "someGeneratorFunction": startup,
        "someNormalFunction": selectAvatar,
      },
    });
  }
  const avatar = yield select(selectAvatar);
  // only get if we don't have it yet
  if (!is(String, avatar)) {
    yield put(GithubActions.userRequest({username: "ascorbic"}));
  }
github thiagobrez / react-native-template-pro / ReactotronConfig.js View on Github external
console.display = (name, value, important = false) => Reactotron.display({
  name,
  value,
  important,
});
github gitpoint / git-point / src / config / reactotron.js View on Github external
console.log = (...args) => {
      oldConsoleLog(...args);

      Reactotron.display({
        name: 'CONSOLE.LOG',
        important: true,
        value: args,
        preview:
          args.length > 0 && typeof args[0] === 'string' ? args[0] : null,
      });
    };
  };
github yinxin630 / fiora / src / client / rnMobile / util / reactotron.js View on Github external
console.logState = (preview, value) => {
    reactotron.display({
        name: 'STATE',
        preview,
        value,
    });
};