Constconst overviewRouteRef = createRouteRef();
const mySubPage = SubPageBlueprint.make({
attachTo: { id: 'page:my-plugin', input: 'pages' },
name: 'overview',
params: {
path: 'overview',
title: 'Overview',
routeRef: overviewRouteRef,
loader: () => import('./components/Overview').then(m => <m.Overview />),
},
});
In the lazy component module:
import { ReactRouterV6PageRouter } from '@backstage/frontend-adapter-react-router-v6';
export const Overview = () => (
<ReactRouterV6PageRouter>
<OverviewContent />
</ReactRouterV6PageRouter>
);
Creates extensions that are sub-page React components attached to a parent page. Sub-pages are rendered as tabs within the parent page's header.
A subpage is an ordinary route-bearing extension below its parent page. The app matches the extension tree, and the parent page renders the selected child. The app provides the matched route ancestry around its entire output.
Existing sub-pages retain implicit React Router v6 matches for compatibility. To select a library explicitly, render its adapter inside the sub-page's lazily loaded component. Adapters compose, so a sub-page may use a different routing library from its parent page.