Skip to content

Types: AddViewPropsGetter<TRoute, TComponent> ​

ts
type AddViewPropsGetter<TRoute, TComponent> = (route, context) => MaybePromise<ComponentProps<TComponent>>;

The props getter for a view added via addView. Receives the resolved route and a context object.

Type Parameters ​

Type Parameter
TRoute extends Route
TComponent extends Component

Parameters ​

ParameterType
routeResolvedRoute<TRoute> & WithData<TRoute>
contextAddViewPropsCallbackContext<TRoute>

Returns ​

MaybePromise<ComponentProps<TComponent>>