App
Root application component that manages routing, layouts, and provides the foundation for Buntal applications.
Source
Type Definition
function App({
rootLayout,
routes,
notFound
}: {
routes: ServerRouterType[]
rootLayout: {
element: (data: any) => ReactNode
ssr?: boolean
data?: unknown
}
notFound?: ReactNode
}): JSX.Element
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
rootLayout | object | ✅ | - | Root layout configuration containing the layout component and its properties |
routes | ServerRouterType[] | ✅ | - | Array of route configurations for the application |
notFound | ReactNode | ❌ | - | Component to render when no route matches (404 page) |
Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
rootLayout.element | (data: any) => ReactNode | ✅ | - | Function that returns the root layout component |
rootLayout.ssr | boolean | ❌ | - | Whether the root layout supports server-side rendering |
rootLayout.data | unknown | ❌ | - | Data to pass to the root layout component |
Last modified: 2025-06-10