Skip to content
Discussion options

You must be logged in to vote

It's because you have duplicated id (like in the RFC), which is not valid. This works:

const router = createRouter({
  history: createWebHistory(),
  routes: [
    { path: '/parent/:id',
    	component: Home,
    	children: [
    	{path: '', component: Foo},
      {path: 'child/:id2', component: Bar},
      {path: 'child-second/:id2', component: Baz}
    ] },
  ],
})

BTW you can check the console for warnings, in this case the router points you to it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2015 on October 13, 2023 06:00.