CJY0208 / react-router-cache-route

Route with cache for react-router V5 like <keep-alive /> in Vue
https://www.npmjs.com/package/react-router-cache-route
MIT License
1.14k stars 110 forks source link

貌似不支持配置式路由 #134

Closed xiaoqufengdi closed 2 years ago

xiaoqufengdi commented 2 years ago

如有配置式的路由,routes为子路由,子路由访问不生效 function RouteWithSubRoutes(route) { return ( <Route path={route.path} render={props => ( // pass the sub-routes down to keep nesting <route.component {...props} routes={route.routes} /> )} /> ); } 具体参照 react router

lichen404 commented 2 years ago

同问

CJY0208 commented 2 years ago

需要自行处理配置式路由规则,当前库只是提供 Route 组件,没办法关注到 json 配置的解析