React-router-1(摘记)

react-router-config 是一个配置静态路由的小助手

import { renderRoutes } from 'react-router-config'
import routes from './router.js'
const App = () => (
   <main>
      <Switch>
         {renderRoutes(routes)}
      </Switch>
   </main>
)

export default App

 

posted on 2019-11-22 17:02  流光易逝  阅读(88)  评论(0编辑  收藏  举报

导航