Hebilicious/form-actions-nuxt

Seems Like Nested Routes Are Not Working

Closed this issue · 1 comments

Environment

See information in Stackblitz example

Reproduction

https://stackblitz.com/edit/nuxt-starter-e96dg7?file=pages%2Ffoo.vue

Describe the bug

  • with nested routes are not working. It appears that the parent route is being called multiple times causing it to pick up the params that are passed to the child route

Additional context

No response

Logs

No response

Hi @aaronksaunders, thanks for reporting this.

  • There's 2 things wrong here, the first one is about the useLoader composable and route parameters, and its being fixed in #45
  • The 2nd one is Nuxt behaviour. pages/foo.vue will always take precedence over pages/foo/[slug].vue, so if you want to match the foo route differently than the foo/a, you need to rename pages/foo.vue into pages/foo/index.vue and it will work as expected.