Manage the steps of rendering a subapp

Each instance of this represents a unique rendering of a given subapp.

It should contain all the information and options for the instance only.

interface SubAppRenderPipeline {
    _mount: ((info) => void);
    _reload: (() => Promise<any>);
    _unmount: ((info) => void);
    executeRender: (() => void);
    getPrepResult: (() => SubAppFeatureResult);
    isPrepared: (() => boolean);
    start: ((reload?) => Promise<any>);
    startPrepare: (() => void);
    waitForPrepare: (() => Promise<SubAppFeatureResult>);
}

Implemented by

Properties

_mount: ((info) => void)

For HMR: a component mount itself to the subapp/pipeline

Type declaration

_reload: (() => Promise<any>)

Hot module reload (HMR) support

Type declaration

    • (): Promise<any>
    • Returns Promise<any>

_unmount: ((info) => void)

For HMR: a component unmount itself from the subapp/pipeline

Type declaration

executeRender: (() => void)

Actually render the subapp (client or server side). subapp must've been prepared.

Type declaration

    • (): void
    • Returns void

getPrepResult: (() => SubAppFeatureResult)

Type declaration

isPrepared: (() => boolean)

Check if pipeline is prepared

Type declaration

    • (): boolean
    • Returns boolean

start: ((reload?) => Promise<any>)

Type declaration

    • (reload?): Promise<any>
    • Parameters

      • Optional reload: boolean

      Returns Promise<any>

startPrepare: (() => void)

Kick off executing a subapp's features to prepare it for rendering

Type declaration

    • (): void
    • Returns void

waitForPrepare: (() => Promise<SubAppFeatureResult>)

Async wait for the subapp's prepare to finish

Type declaration