Declare a subapp.
subapp
For Example, to declare a subapp named "Sample" to load its implementation module sample.tsx:
"Sample"
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 ]} Copy
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
app.tsx
import { declareSubApp } from "@xarc/react";export const Sample = declareSubApp({ name: "Sample", getModule: () => import("./sample")}) Copy
import { declareSubApp } from "@xarc/react";export const Sample = declareSubApp({ name: "Sample", getModule: () => import("./sample")})
subapp options
Declare a subapp.
subapp.For Example, to declare a subapp named
"Sample"to load its implementation modulesample.tsx:Subapp implementation module:
sample.tsxYour app entry module:
app.tsx