metro
metro copied to clipboard
Add option to reverse 8081 port after connection is lost
Do you want to request a feature or report a bug? feature
What is the current behavior? To reconnect the development device, one has to manually execute adb reverse tcp:8081 tcp:8081
If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install
and yarn test
.
What is the expected behavior?
I noticed recently that running a whole new build is not required when metro doesn't find my device because the usb connection got removed, the only step required is to reverse the ports again. I think it would be a good addition to the options in the metro interface (open dev menu/run android/run ios/reload) to be able to trigger this command. (I'm guessing there's something similar for ios?).
Im suggesting adding another option 'c' to connect the device with adb reverse tcp:8081 tcp:8081
I would be happy to contribute this if it is wanted :)
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system. n/a
Hey @bcye! I think for the time being this type of feature fits best in the React Native CLI (or the Expo CLI, depends on what you're using) which wraps Metro. In particular, the "open dev menu / run android / run ios" interface you're referring to is not part of Metro.