Skip to content

Instantly share code, notes, and snippets.

@csorlandi
Created July 28, 2020 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csorlandi/6de1b147300078434b440499ff141767 to your computer and use it in GitHub Desktop.
Save csorlandi/6de1b147300078434b440499ff141767 to your computer and use it in GitHub Desktop.
import { NativeModules } from 'react-native';
import Reactotron from 'reactotron-react-native';
if (__DEV__) {
const { scriptURL } = NativeModules.SourceCode;
const scriptHostname = scriptURL.split('://')[1].split(':')[0];
const tron = Reactotron.configure({ host: scriptHostname })
.useReactNative()
.connect();
tron.clear();
console.tron = tron;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment