2018-01-12 20:08:31 +00:00
|
|
|
/* eslint-disable */
|
2018-07-10 13:40:32 +00:00
|
|
|
import { NativeModules } from 'react-native';
|
2018-03-23 16:55:40 +00:00
|
|
|
import Reactotron from 'reactotron-react-native';
|
2018-01-12 20:08:31 +00:00
|
|
|
import { reactotronRedux } from 'reactotron-redux';
|
2018-03-23 16:55:40 +00:00
|
|
|
import sagaPlugin from 'reactotron-redux-saga'
|
2018-01-12 20:08:31 +00:00
|
|
|
|
2018-03-23 16:55:40 +00:00
|
|
|
if (__DEV__) {
|
2018-07-10 13:40:32 +00:00
|
|
|
const scriptURL = NativeModules.SourceCode.scriptURL;
|
|
|
|
const scriptHostname = scriptURL.split('://')[1].split(':')[0];
|
2018-03-23 16:55:40 +00:00
|
|
|
Reactotron
|
2018-07-10 13:40:32 +00:00
|
|
|
.configure({ host: scriptHostname })
|
2018-03-23 16:55:40 +00:00
|
|
|
.useReactNative()
|
|
|
|
.use(reactotronRedux())
|
|
|
|
.use(sagaPlugin())
|
|
|
|
.connect();
|
2018-04-24 19:34:03 +00:00
|
|
|
// Running on android device
|
|
|
|
// $ adb reverse tcp:9090 tcp:9090
|
2018-05-24 20:17:00 +00:00
|
|
|
Reactotron.clear();
|
|
|
|
console.warn = Reactotron.log;
|
2018-12-05 20:52:08 +00:00
|
|
|
console.log = Reactotron.log;
|
2019-09-03 19:27:57 +00:00
|
|
|
console.disableYellowBox = true;
|
2018-03-23 16:55:40 +00:00
|
|
|
}
|