How to use the reactotron-react-native.asyncStorage 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 zulip / zulip-mobile / src / ReactotronConfig.js View on Github external
import Reactotron, { asyncStorage, networking, openInEditor } from 'reactotron-react-native';
import { NativeModules } from 'react-native';

import { reactotronRedux } from 'reactotron-redux';

// uncomment the following lines to test on a device
// let scriptHostname;
// if (__DEV__) {
//   const scriptURL = NativeModules.SourceCode.scriptURL;
//   scriptHostname = scriptURL.split('://')[1].split(':')[0];
// }

Reactotron.configure(/*{ host: scriptHostname }*/) // controls connection & communication settings
  .useReactNative() // add all built-in react native plugins
  .use(reactotronRedux())
  .use(asyncStorage())
  .use(networking())
  .use(openInEditor())
  .connect();
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 thinger-io / Mobile-App / src / config / reactotron.js View on Github external
/* eslint-disable no-console */
import Reactotron, { asyncStorage } from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
import apisaucePlugin from 'reactotron-apisauce';
import sagaPlugin from 'reactotron-redux-saga';

import Config from '.';

Reactotron.configure({
  name: 'Thinger.io',
  // host: '192.168.31.161',
})
  .useReactNative()
  .use(asyncStorage())
  .use(apisaucePlugin())
  .use(reactotronRedux())
  .use(sagaPlugin());

if (Config.useReactotron) {
  Reactotron.connect().clear();
  console.tron = Reactotron;
} else {
  console.tron = console.log;
}
github forest-watcher / forest-watcher / app / store.js View on Github external
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);

const middlewareList = [thunk, authMiddleware, sagaMiddleware];

function createAppStore(startApp) {
github textileio / photos / App / Config / ReactotronConfig.ts View on Github external
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()
}