react-router-guard
Version:
React Router Guard
21 lines (20 loc) • 551 B
TypeScript
import React from 'react';
export declare type Props = {
path: string;
render: (props: any) => void;
canActivate?: Array<Promise<Function>>;
exact?: boolean;
strict?: boolean;
guardData: object;
};
declare class RouteGuard extends React.Component<Props> {
static defaultProps: {
canActivate: [];
exact: false;
strict: false;
};
renderAsync(props: any): JSX.Element;
renderChildren: (props: any) => JSX.Element;
render(): JSX.Element;
}
export default RouteGuard;