How to let it work when use real device?
+1
I haven't tested this but you can specify a host and port in the configure call. So you would do something like:
Reactotron.configure({ host: '<IP TO YOUR MACHINE>', port: <PORT IF OTHER THEN DEFAULT> }).connect()
Of course you have to ensure that your machine lets traffic in on the port.
It's work, thanks.
I am facing some problem. @rmevans9 do we need to change anything under "Dev Setting" ? and what is the default port ? 9090, 8081 or any other ?
馃憢 Hello @smitthakkar1!
No changes should need to happen. The default port for Reactotron is 9090. If it still doesn't work then I would recommend checking versions for reactotron for both the module (in package.json) and the reactotron app. If that doesn't show the issue please open a new issue as this one is a bit dated.
Worked it. thanks @rmevans9 . appreciate your quick response.
I did this so that I didn't have to configure the ip manually when switching between physical devices and simulators.
import Reactotron from 'reactotron-react-native';
import { NativeModules } from 'react-native';
// grabs the ip address
const host = NativeModules.SourceCode.scriptURL.split('://')[1].split(':')[0];
const reactotron = Reactotron.configure({ host })
.useReactNative()
.connect();
export default reactotron;
@ericadamski Thanks for saving my time.
Most helpful comment
I did this so that I didn't have to configure the ip manually when switching between physical devices and simulators.