Reactotron: set reactotron default host without using code

Created on 21 Mar 2019  路  5Comments  路  Source: infinitered/reactotron

I install reactotron on my Ubuntu 18.04.2 LTS, I am using
"react-native": "0.58.5"
"reactotron-react-native": "2.2.0"
the first time when reactotron didn't connect to my react native application with this configuration.

const reactotron = Reactotron.configure().useReactNative().connect()

I looked for solution on and I found that I have to add my IP address like this

const reactotron = Reactotron.configure({ host: My_IP_Adress' }).useReactNative().connect()

it work but the problem is that I am working with a team so I have to modify the _reactotron.config.js_ before any push and it annoying me so I am looking for solution without updating my _reactotron.config.js_ .
someone can help
thank you

need info question

Most helpful comment

@kevinvangelder thank u doesn't work.
I found an other solution, just run adb reverse tcp:9090 tcp:9090 on the terminal and it work
https://github.com/infinitered/reactotron/issues/431

All 5 comments

Is this a simulator or real device?

With simulator/emulator, you should be able to just set host to 127.0.0.1, though I suppose we could add that as a fallback if no host is provided.

@kevinvangelder thank u doesn't work.
I found an other solution, just run adb reverse tcp:9090 tcp:9090 on the terminal and it work
https://github.com/infinitered/reactotron/issues/431

@rady-ben Correct me if I'm wrong, but it sounds like Reactotron does correctly connect to localhost when no host is provided, you just have to follow the normal process of running adb reverse tcp:9090 tcp:9090 in order for it to connect.

While this isn't ideal, it is the currently expected behavior. Please note you will need to rerun that command any time you restart your emulator or reconnect a physical device.

There's a great answer here https://github.com/infinitered/reactotron/issues/272#issuecomment-272013885 from @mkubliniak to get this working.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidjb picture davidjb  路  5Comments

wilr picture wilr  路  3Comments

Kida007 picture Kida007  路  4Comments

AdrienLemaire picture AdrienLemaire  路  3Comments

Eyesonly88 picture Eyesonly88  路  4Comments