Files
react-native/Libraries
Dan Abramov 5e960e30eb Don't show warnings unless we managed to connect
Summary:
On iOS we don't call `HMRClient.setup()` when Metro is off. So we don't bump into any odd cases.

But on Android, we do call `HMRClient.setup()` even if Metro is off. As a result, we might show a warning about Metro not running to a native engineer who doesn't care (because they don't intend to work on JS).

We could fix this on Android on the native side. And we probably should.

But we can also strengthen it here. The idea is that we should only show warnings about disconnecting from Metro *if we ever managed to successfully connect in the first place*. Otherwise, we can assume that you didn't mean to connect.

If the user is trying to determine the source of the problem, they can still do a full Refresh (on iOS this will show a message about needing Metro, on Android it would show a redbox). So this diff makes the disconnected behavior closer to how it worked before Fast Refresh.

Reviewed By: sahrens

Differential Revision: D16460439

fbshipit-source-id: bf962ff34c25d9734d9668dd583591acacb98253
2019-07-24 11:11:46 -07:00
..
2019-07-23 03:23:11 -07:00
2019-07-11 12:02:39 -07:00
2019-07-23 03:23:11 -07:00
2019-07-11 12:02:39 -07:00
2019-05-20 18:05:55 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-19 21:43:05 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-06-07 06:39:28 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00