real-world-vue icon indicating copy to clipboard operation
real-world-vue copied to clipboard

Mastering Vuex - Lesson 11 - event-create route in wrong order

Open amberwilson opened this issue 4 years ago • 2 comments

The start tag's code for Lesson 11 has the event-create and event-show routes out of order. The "finish" tag's code has it fixed and course notes in the Mastering Vuex Orientation shows it setup right but I don't believe it's ever mentioned in the video that it needs to be reordered.

This:

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'event-list',
      component: EventList
    },
    {
      path: '/event/:id',
      name: 'event-show',
      component: EventShow,
      props: true
    },
    {
      path: '/event/create',
      name: 'event-create',
      component: EventCreate
    }
  ]
})

Should be:

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'event-list',
      component: EventList
    },
    {
      path: '/event/create',
      name: 'event-create',
      component: EventCreate
    },
    {
      path: '/event/:id',
      name: 'event-show',
      component: EventShow,
      props: true
    }
  ]
})

amberwilson avatar Apr 18 '20 14:04 amberwilson

yes, I had the same issue and this is going to be a little bit confusing to the beginners

vighneshwho avatar May 02 '20 04:05 vighneshwho

@amberwilson thanks. this fix also my issue wit 404 on json-server

git001 avatar Sep 26 '20 11:09 git001