wobsoriano / numix

Write your server code inside Vue SFC's and handle forms easily.
https://numix.vercel.app
214 stars 1 forks source link

Nested routes are not supported #5

Open maoberlehner opened 1 year ago

maoberlehner commented 1 year ago

Problem:

A huge part of what makes Remix great is loading of nested data. Unfortunately, as of now, this seems not to be supported by this plugin yet.

Reproduction:

See: https://stackblitz.com/edit/nuxt-starter-mwn1xp?file=pages%2Ffoo%2F[slug].vue&initialpath=/foo/1

wobsoriano commented 1 year ago

Nested routes supported have been added!

Sorry for the late response 😆

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

maoberlehner commented 1 year ago

No worries ;)

Unfortunately it doesn't work with the Stackblitz you provided: https://stackblitz.com/edit/nuxt-starter-euxwj6?file=pages%2Ffoo.vue&initialpath=/foo/1 (Root: should be Root: bar)

aaronksaunders commented 1 year ago

any expected date for this issue to be resolved? This is a pretty interesting project, thanks in advance

wobsoriano commented 1 year ago

Hey @aaronksaunders, still trying to figure out how to get the exact route name of a nested route.

Currently using useRoute().name to generate a unique key to pass to useAsyncData. You can see it here. This doesn't work on nested routes, as it returns the current route name to all components accessing it.

Have you checked form-actions-nuxt?

aaronksaunders commented 1 year ago

Yes, I am trying to work through some issues there also, got the nested routes working I think, now trying to get form actions going.

On Mon, Aug 28, 2023 at 1:13 PM Robert Soriano @.***> wrote:

Hey @aaronksaunders https://github.com/aaronksaunders, still trying to figure out how to get the exact route name of a nested route.

Currently using useRoute().name to generate a unique key to pass to useAsyncData. You can see it here https://github.com/wobsoriano/numix/blob/48595211a54b101f2f15174f78d3eea4d6b6ff86/src/runtime/composables/other.ts#L15. This doesn't work on nested routes, as it returns the current route name to all components accessing it.

Have you checked form-actions-nuxt https://github.com/Hebilicious/form-actions-nuxt?

— Reply to this email directly, view it on GitHub https://github.com/wobsoriano/numix/issues/5#issuecomment-1696052951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEAFGNMD3CD4VZIGPHR4ULXXTGUHANCNFSM6AAAAAAUDCM3EA . You are receiving this because you were mentioned.Message ID: @.***>