📜  react router dom private route typescript 代码示例

📅  最后修改于: 2022-03-11 14:48:31.178000             🧑  作者: Mango

代码示例1
import * as React from "react";
import { Route } from "react-router-dom";

interface IProps {
    exact?: boolean;
    path: string;
    component: React.ComponentType;
}

const LoggedOutRoute = ({
    component: Component,
    ...otherProps
}: IProps) => (
    <>
        
Logged Out Header
( <> )} /> ); export default LoggedOutRoute;