mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Introduce Packager and App HMR WebSocket connection
Summary: public This diff adds infra to both the Packager and the running app to have a WebSocket based connection between them. This connection is toggled by a new dev menu item, namely `Enable/Disable Hot Loading`. Reviewed By: vjeux Differential Revision: D2787621 fb-gh-sync-id: d1dee769348e4830c28782e7b650d025f2b3a786
This commit is contained in:
committed by
facebook-github-bot-6
parent
f72cfdd9fa
commit
90781d3067
@@ -25,6 +25,11 @@ const JSTimersExecution = require('JSTimersExecution');
|
||||
BatchedBridge.registerCallableModule('Systrace', Systrace);
|
||||
BatchedBridge.registerCallableModule('JSTimersExecution', JSTimersExecution);
|
||||
|
||||
if (__DEV__) {
|
||||
const HMRClient = require('HMRClient');
|
||||
BatchedBridge.registerCallableModule('HMRClient', HMRClient);
|
||||
}
|
||||
|
||||
// Wire up the batched bridge on the global object so that we can call into it.
|
||||
// Ideally, this would be the inverse relationship. I.e. the native environment
|
||||
// provides this global directly with its script embedded. Then this module
|
||||
|
||||
Reference in New Issue
Block a user