Function: registerRoute()
function registerRoute(routeSpec: Route): void
Add a Route for a component.
Parameters
Parameter | Type | Description |
---|---|---|
routeSpec | Route | details of URL, highlighted sidebar and component to use. |
Returns
void
Example
import { registerRoute } from '@kinvolk/headlamp-plugin/lib';
// Add a route that will display the given component and select
// the "traces" sidebar item.
registerRoute({
path: '/traces',
sidebar: 'traces',
component: () => <TraceList />
});