Nested Layouts DX is pretty difficult #1681
-
ConcernsI did a bit more reading with Nested Layouts. The DX for layouts is kind of difficult :((. Is it possible to make it work a bit more like SvelteKit and NextJS? Currently to do Nested Layouts:
I don't know, it just doesn't feel cohesive. Right now, I think this is one huge deal-breaker for me to use Vike :( SuggestionsI know Vike users don't prefer Next or other metaframeworks. I still think NextJS and SvelteKit nailed the DX for file-system routing really well. Here are some features that Vike currently lacks that can't replicate what you can do in Next:
Currently by default, using Example:
This is useful for route grouping without affecting paths + grouping nested layouts without affecting paths. When parenthesis is there:
Normally:
Let me know your thoughts! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
In SvelteKit, this is how I usually address this need (issue#1583) for "non-cumulative" layouts: wherein (website) is the landing page and (app) is the dashboard. |
Beta Was this translation helpful? Give feedback.
-
Quick spontaneous reaction: would making +Layout cumulative resolve your issues? I'll think more about your feedback later. |
Beta Was this translation helpful? Give feedback.
-
@brillout I tried porting everything to Solid Start to see if it makes a difference just so I can demonstrate it to you maybe. vike.vs.solid.start.mp4Here are the codebases for both by the way: |
Beta Was this translation helpful? Give feedback.
-
Let me know if I'm missing something, but I think the conversation can be wrapped up in the following three feature requests: |
Beta Was this translation helpful? Give feedback.
Done: https://vike.dev/Layout#nested-layouts.
I went ahead and marked this reply as answer but feel free to disagree.