Create-react-native-app: Hot Reloading with multiple app instances

Created on 13 Mar 2017  ·  8Comments  ·  Source: expo/create-react-native-app

If I have both simulator and a device opened on the same app, it won't update both if at least one of them has "Hot Reloading" enabled.

  1. Open app on simulator
  2. Open app on device (scanning qrcode)
  3. Disable hot reloading on all of them
  4. Enable live reload on all of them
  5. Make changes
  6. All devices will update
  7. Enable hot reloading on one of them
  8. Make changes
  9. Only this one will update
enhancement underlying tools

Most helpful comment

Thanks for the report! We're aware of some issues with multiple devices and HMR with the React Native packager (the underlying build tool we rely on). I'll leave this open as a tracking issue so we can work with upstream to improve this situation.

All 8 comments

Thanks for the report! We're aware of some issues with multiple devices and HMR with the React Native packager (the underlying build tool we rely on). I'll leave this open as a tracking issue so we can work with upstream to improve this situation.

What is the status of this? Is there currently a way to have hot reload on multiple devices?

Thanks for the report! I opened an issue on the metro-bundler repo for this -- this issue impacts create-react-native-app but cannot be fixed in create-react-native-app, it lives in the bundler.

See: https://github.com/facebook/metro-bundler/issues/8

Metro bundler says it's not the right place. https://github.com/facebook/metro-bundler/issues/8#issuecomment-307654504

So what happens now? This PR (https://github.com/facebook/react-native/pull/7475) was very close. And it is needless to say that react-native lives due to its cross-platform app development velocity. Simultaneous HMR is there quite an asset.

Please correct me if there is another way by now (any link?) — but can this be bumped up?

I've got Android Emulator and iOS Simulator open here and only 1 hot reloads. The one that was started up last, gets the reloads. The other one just sits there.

@evannieuwburg It should be fixed on React Native 0.50.

Was this page helpful?
0 / 5 - 0 ratings