Docs (4.0.0)
class GlobalContext method

hotReload

Adds a hot-reload handler for the provided module handle, to update instances of a particular activity.

hotReload(handle: any, ActivityClass: new (...args: any[]) => Activity): void

Notes

  • Where supported, hot-reloading the provided module will update instances of the specified activity: updating methods (but not properties), and calling Activity.ready().
  • If hot-reloading isn’t supported, e.g. if the application is compiled in production mode, this method does nothing.

Parameters

  • handle — The module that contains the activity to be hot-reloaded, or hot-reload handle (e.g. import.meta.hot, depending on build system)
  • ActivityClass — The activity that should be updated and re-rendered

Related