Repository URL to install this package:
|
Version:
0.0.15 ▾
|
/**
* @todo console.group these
*
* @throws LogicException
*
* 1. renders routes
* @example /myaccount
* - this calls
* 2. renders subroutes
* @example /myaccount/orders
* a. checks if the route params HAS subroutes
* b. checks the route.component.getComponentForRoute
* c. else, route.component.getComponentForSubRoute
*
*
* @module Router
*
* @variation minimal can be
* 1. create a flat array
* 2. sort by length (longest, shortest)
*
* @variation
* 1. use context
* 2. if context.subroutes
* - render the first to match
* - then it would keep traversing
*
*/
import * as React from 'react';
import { MatchPathParamsType, RoutePathObjType } from '@skava/router';
export interface PrevLocationProps {
match: MatchPathParamsType;
location: Location;
}
export interface RoutingProps extends React.ClassAttributes<any> {
routes: RoutePathObjType[];
location?: {
[key: string]: any;
};
}
/**
* @description OneRouterRouter
*/
declare class Routing extends React.PureComponent<RoutingProps> {
componentDidMount(): void;
render(): JSX.Element;
}
export { Routing };
export default Routing;