Skip to content

Instantly share code, notes, and snippets.

@csorlandi
Created December 28, 2018 11:15
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/f0c3221ff3f11d0786b033103cc16680 to your computer and use it in GitHub Desktop.
Save csorlandi/f0c3221ff3f11d0786b033103cc16680 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.scriptURL;
scriptHostname = scriptURL.split('://')[1].split(':')[0];
const tron = Reactotron
.configure({host: scriptHostname})
.connect();
tron.clear();
console.tron = tron;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment