reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

set reactotron default host without using code

Open rady-ben opened this issue 7 years ago • 5 comments

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

rady-ben avatar Mar 21 '19 12:03 rady-ben

Is this a simulator or real device?

rmevans9 avatar Mar 21 '19 15:03 rmevans9

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 avatar Mar 27 '19 03:03 kevinvangelder

@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 avatar Apr 06 '19 16:04 rady-ben

@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.

kevinvangelder avatar Apr 08 '19 20:04 kevinvangelder

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

ninjz avatar Jan 29 '20 08:01 ninjz