普通反应路由器v4

时间:2018-10-06 19:56:28

标签: reactjs react-router react-router-v4

是否可以在react-router v4中创建普通路由? Ex(v3版本):

const routes = {
  path: '/',
  indexRoute: {onEnter: (nextState, replace) => replace('/calendar')},
  childRoutes: [
    {path: '/calendar', component: CalendarContainer},
    {path: '/booking/:id', component: BookingContainer}
  ]
};

0 个答案:

没有答案