为了账号安全,请及时绑定邮箱和手机立即绑定

react路由

react路由

海绵宝宝撒 2018-09-23 10:47:42
<Index location={location}>{        routes.map(r => {          console.log(r)            return(              <Route                 key={r.path}                 exact                 path={r.path}                 component={r.component}               />             )           }}<Index>报错Uncaught Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.其中routes=[{path: '/app/ui/buttons', component: () =>import('../components/buttons')},{path: '/app/ui/icons', component: () =>import('../components/icons')}...]
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 654 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信