Function declareSubApp

  • Declare a subapp.

    • Your file that implements the SubApp should export it with the name subapp.

    For Example, to declare a subapp named "Sample" to load its implementation module sample.tsx:

    Subapp implementation module: sample.tsx

    import { ReactSubApp, React } from "@xarc/react";

    const Sample = () => <div>Sample<div/>

    export subapp: ReactSubApp = {
    Component: Sample,
    wantFeatures: [
    // additional features for the subapp
    ]
    }

    Your app entry module: app.tsx

    import { declareSubApp } from "@xarc/react";

    export const Sample = declareSubApp({
    name: "Sample",
    getModule: () => import("./sample")
    })

    Parameters

    • options: SubAppOptions

      subapp options

    Returns SubAppDef