docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A host shell that loads remote micro apps, allows runtime addition of new micro apps, and renders them through a pluggable router component.
export interface MicroAppDefinition {
id: string;
basename: string;
assetUrl: string;
title?: string;
}
export interface RouteRendererProps {
app: MicroAppDefinition;
status: "loading" | "error" | "ready";
children?: React.ReactNode;
}
export type RouteRenderer = (props: RouteRendererProps) => React.ReactElement;
export interface ShellConfig {
apps: MicroAppDefinition[];
routeRenderer: RouteRenderer;
hostFallback: React.ReactElement;
onAppEnter?: (payload: { appId: string; pathname: string }) => void;
onAppLeave?: (payload: { appId: string; pathname: string }) => void;
}
export interface ShellInstance {
addOrReplaceApp: (app: MicroAppDefinition) => void;
Shell: React.ComponentType;
}
/**
* Creates a shell instance that renders configured micro apps,
* supports runtime app registration, and relays enter/leave events.
*/
export function createMicroShell(config: ShellConfig): ShellInstance;Provides framework-mode micro-frontend orchestration, dynamic app registration, and pluggable routing for host shells.