-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Packager] Only a single simulator gets LiveReload/HMR connections in Xcode 9 #14334
Comments
This file: https://github.com/facebook/react-native/blob/master/local-cli/server/util/attachHMRServer.js needs to be turned into a class per platform. |
+1 This problem occurs also when there are multiple physical devices running hot reload. The only one that updated is the last one you enable |
I have what appears to be the same problem when running Android and iOS simulators simultaneously - the last one reloaded gets the hot reload. Does that work for others? |
Summary: This diff builds on top of the refactor to use `async/await` and adds multi-client support to Hot Module Reloading. Thanks to async/await it's been quite straightforward to add this logic, since the only thing that I've had to do is to create a `Set` with the currently connected clients and passed the specified client to each method that was using the global client before. This closes facebook/react-native#14334 Reviewed By: davidaurelio Differential Revision: D5611176 fbshipit-source-id: ec29438887342877c372b61132efada16af58fa5
Description
Installed the Xcode9-beta simulator, opened up my app in two different devices and hit save.
You can see it happening in this tweet: https://twitter.com/orta/status/872002403930968064
Reproduction Steps and Sample Code
List all the steps required to reproduce the issue you're reporting. These steps should be clear and concise.
Once you have two simulators running, whichever simulator you hit
cmd +r
on last is the one that receives notifications about the module changes.Solution
Ideally React Native Packager would support multiple connections.
Additional Information
The text was updated successfully, but these errors were encountered: