How to use the reactotron-react-native.log 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 aerian-studios / ignite-typescript-boilerplate / boilerplate / App / Reducers / ScreenTrackingMiddleware.tsx View on Github external
if (
    action.type !== NavigationActions.NAVIGATE &&
    action.type !== NavigationActions.BACK
  ) {
    return next(action);
  }

  const currentScreen = getCurrentRouteName(getState().nav);
  const result = next(action);
  const nextScreen = getCurrentRouteName(getState().nav);
  if (nextScreen !== currentScreen) {
    try {
      Reactotron.log(`NAVIGATING ${currentScreen} to ${nextScreen}`);
      // Example: Analytics.trackEvent('user_navigation', {currentScreen, nextScreen})
    } catch (e) {
      Reactotron.log(e);
    }
  }
  return result;
};
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,
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,
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,
github aerian-studios / ignite-typescript-boilerplate / boilerplate / App / Reducers / ScreenTrackingMiddleware.tsx View on Github external
const screenTracking = ({ getState }) => (next) => (action) => {
  if (
    action.type !== NavigationActions.NAVIGATE &&
    action.type !== NavigationActions.BACK
  ) {
    return next(action);
  }

  const currentScreen = getCurrentRouteName(getState().nav);
  const result = next(action);
  const nextScreen = getCurrentRouteName(getState().nav);
  if (nextScreen !== currentScreen) {
    try {
      Reactotron.log(`NAVIGATING ${currentScreen} to ${nextScreen}`);
      // Example: Analytics.trackEvent('user_navigation', {currentScreen, nextScreen})
    } catch (e) {
      Reactotron.log(e);
    }
  }
  return result;
};