Skip to content

Commit

Permalink
fix reactotron multiple connections
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlsilva committed Feb 9, 2022
1 parent 5997c7a commit 2a3dd79
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/ReactotronConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable */
import AsyncStorage from '@react-native-community/async-storage';
import { NativeModules } from 'react-native';
import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
Expand All @@ -7,7 +8,12 @@ import sagaPlugin from 'reactotron-redux-saga';
if (__DEV__) {
const scriptURL = NativeModules.SourceCode.scriptURL;
const scriptHostname = scriptURL.split('://')[1].split(':')[0];
Reactotron.configure({ host: scriptHostname }).useReactNative().use(reactotronRedux()).use(sagaPlugin()).connect();
Reactotron.setAsyncStorageHandler(AsyncStorage)
.configure({ host: scriptHostname })
.useReactNative()
.use(reactotronRedux())
.use(sagaPlugin())
.connect();
// Running on android device
// $ adb reverse tcp:9090 tcp:9090
Reactotron.clear();
Expand Down

0 comments on commit 2a3dd79

Please sign in to comment.