Type Parameters
const T extends Record<string, InnerRouteConfig_T<any>>
Parameters
__namedParameters: {
Comp404: ComponentType<{}>;
routes: T;
}
Comp404: ComponentType<{}>
routes: T
Returns {
paths: {
[K in string | number | symbol]: T[K] extends InnerRouteConfig_T<X>
? RouteConfig_T<X>
: never
};
switch: Element;
}
an object containing the wouter component and all the routes, should be wrapped in a .
Render with routes.switch
, build paths with routes.paths.home.build({foo: "bar"})
, etc.
paths: {
[K in string | number | symbol]: T[K] extends InnerRouteConfig_T<X>
? RouteConfig_T<X>
: never
}
switch: Element
The producer of wouter components and all the routes, with a fallback and param coercion.