import { type ReactElement } from 'react'; import type { RouterViewProps } from './types'; /** * RouterView component that renders the matched route component. * Acts as a placeholder where route components are rendered based on the current route. * Supports nested routing with automatic depth tracking. * * @param props - Component props * @param props.fallback - Optional fallback component when no route matches * * @example * ```tsx * // Basic usage * import { RouterView } from '@esmx/router-react'; * * function App() { * return ( *
* * *
* ); * } * ``` * * @example * ```tsx * // Nested routing * // Routes: [ * // { path: '/users', component: UsersLayout, children: [ * // { path: ':id', component: UserProfile } * // ]} * // ] * * function UsersLayout() { * return ( *
*

Users

* // Renders UserProfile for /users/:id *
* ); * } * ``` * * @example * ```tsx * // With fallback * import { RouterView } from '@esmx/router-react'; * * function App() { * return ( * Page not found} /> * ); * } * ``` */ export declare function RouterView({ fallback }: RouterViewProps): ReactElement | null; export declare namespace RouterView { var displayName: string; }