@saber2pr/router
Version:
> react-router-dom by hooks api.
13 lines (12 loc) • 448 B
TypeScript
import React from 'react';
export interface RouteProps {
path?: string;
component: React.ComponentType<any>;
default?: boolean;
}
export interface RouteElement extends JSX.Element {
props: RouteProps;
}
export declare const isRoute: (c: JSX.Element) => c is RouteElement;
export declare const isDefaultRoute: (c: JSX.Element) => c is RouteElement;
export declare function Route({ component: R, ...props }: RouteProps): JSX.Element;