推荐一个像vue一样使用router的库react-router-pro

#1

废话不多说,上代码

import {RouterPro} from "react-router-pro"
import Index from "./page/home"

let data = [{
    name: "主页",
    path: "/",
    component: Index,
    icon: "HomeOutlined",
}];

 <RouterPro data={data}/>

不入侵,随插随用,超轻量
库地址:地址

1 Like
#2

现在论坛这么没人气了吗:drooling_face:

#3

let data= [{
path:’/’,
component:Login,
name:‘登录页’
},
{
path:’/Home’,
component:Home,
name:‘主页’,
children:[{
name: “主页2”,
path: “/BrandHomepage”,
component: BrandHomepage,
}]
}
]

有children的路由就找不见。~你有这样的问题么
如果把children就没有问题。。但是看文档也是可以有children的呀

#4

我这暂时没发现这个问题,你可以更新最新的试试呢