Created
July 28, 2020 03:35
-
-
Save csorlandi/6de1b147300078434b440499ff141767 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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