public interface HMRClient extends JavaScriptModule
The HMR(Hot Module Replacement)Client allows for the application to receive updates from the packager server (over a web socket), allowing for injection of JavaScript to the running application (without a refresh).
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Turns off the HMR client so it doesn't process updates from the packager.
|
void |
enable()
Sets up a connection to the packager when called the first time.
|
void |
setup(java.lang.String platform,
java.lang.String bundleEntry,
java.lang.String host,
int port,
boolean isEnabled)
Enable the HMRClient so that the client will receive updates from the packager server.
|
void setup(java.lang.String platform,
java.lang.String bundleEntry,
java.lang.String host,
int port,
boolean isEnabled)
platform - The platform in which HMR updates will be enabled. Should be "android".bundleEntry - The path to the bundle entry file (e.g. index.ios.bundle).host - The host that the HMRClient should communicate with.port - The port that the HMRClient should communicate with on the host.isEnabled - Whether HMR is enabled initially.void enable()
void disable()