Home > @elux/vue-web > createApp

createApp() function

创建应用(CSR)

Signature:

export declare function createApp(appConfig: AppConfig): EluxApp;

Parameters

ParameterTypeDescription
appConfigAppConfig应用配置

Returns:

EluxApp

返回包含render方法的实例,参见RenderOptions

Example

createApp(config)
.render()
.then(() => {
  const initLoading = document.getElementById('root-loading');
  if (initLoading) {
    initLoading.parentNode!.removeChild(initLoading);
  }
});