Skip to main content

Function: registerRoute()

function registerRoute(routeSpec: Route): void

Add a Route for a component.

Parameters

ParameterTypeDescription
routeSpecRoutedetails 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 />
});

See

Defined in

src/plugin/registry.tsx:323