Interface AppWrapperLifecycleFnProps<RegProps>

Describes all properties that are passed by ILC & single-spa to the application wrapper lifecycle Fns

Type Parameters

  • RegProps = unknown

Hierarchy

Properties

appSdk: IIlcAppSdk

Isomorphic API that can be used during SSR & CSR. Documentation

appWrapperData?: {
    appId: string;
}

The appWrapperData object identifies that application execution is controlled by Wrapper The namespace contains params that identifies Wrapper appWrapperData.appId identifier of Wrapper

Type declaration

  • appId: string
domElementGetter: (() => HTMLElement)

Type declaration

    • (): HTMLElement
    • Returns ref to HTMLElement that should be used as container to render app's content

      Returns HTMLElement

errorHandler: ErrorHandler

App MUST use it to propagate all unhandled errors. Usually it's used in app's adapter.

getCurrentBasePath: (() => string)

Type declaration

    • (): string
    • Base path that is relative to the matched route.

      So for reqUrl = /a/b/c?d=1 & matched route /a/* base path will be /a/. While for reqUrl = /a/b/c?d=1 & matched route /a/b/c base path will be /a/b/c.

      Returns string

getCurrentPathProps: (() => RegProps)

Type declaration

    • (): RegProps
    • Returns Props that were defined for current path

      Returns RegProps

getWrappedAppProps?: (() => RegProps)

Type declaration

    • (): RegProps
    • Returns Props that were defined for wrapped app. Method available only for wrappers

      Returns RegProps

mountParcel: MountParcel

Each application is provided a mountParcel function. The main advantage to using an applications mountParcel function is that parcels mounted via an applications mountParcel will be automatically unmounted when the application is unmounted.

name: string

Unique application ID, if same app will be rendered twice on a page - it will get different IDs

renderApp: (<T>(props: T) => Promise<void>)

Type declaration

    • <T>(props: T): Promise<void>
    • Allows to perform rendering of the target app. Returns promise which resolves after target app mount. See more details in ILC App Wrappers documentation.

      Type Parameters

      Parameters

      • props: T

      Returns Promise<void>

Generated using TypeDoc