buntal - components

App

Root application component that manages routing, layouts, and provides the foundation for Buntal applications.

Source

View source on GitHub

Type Definition

function App({
  rootLayout,
  routes,
  notFound
}: {
  routes: ServerRouterType[]
  rootLayout: {
    element: (data: any) => ReactNode
    ssr?: boolean
    data?: unknown
  }
  notFound?: ReactNode
}): JSX.Element

Parameters

ParameterTypeRequiredDefaultDescription
rootLayoutobject-Root layout configuration containing the layout component and its properties
routesServerRouterType[]-Array of route configurations for the application
notFoundReactNode-Component to render when no route matches (404 page)

Properties

PropertyTypeRequiredDefaultDescription
rootLayout.element(data: any) => ReactNode-Function that returns the root layout component
rootLayout.ssrboolean-Whether the root layout supports server-side rendering
rootLayout.dataunknown-Data to pass to the root layout component

Last modified: 2025-06-10

Content-Length: 0