HMRClient

JS module interface for HMRClient

The HMR(Hot Module Replacement)Client allows for the application to receive updates from Metro (over a web socket), allowing for injection of JavaScript to the running application (without a refresh).

Functions

Link copied to clipboard
abstract fun disable()

Turns off the HMR client so it doesn't process updates from the packager.

Link copied to clipboard
abstract fun enable()

Sets up a connection to the packager when called the first time. Ensures code updates received from the packager are applied.

Link copied to clipboard
abstract fun registerBundle(bundleUrl: String?)

Registers an additional JS bundle with HMRClient.

Link copied to clipboard
abstract fun setup(platform: String?, bundleEntry: String?, host: String?, port: Int, isEnabled: Boolean, scheme: String?)

Enable the HMRClient so that the client will receive updates from Metro.