-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout
nesting simply wraps Page
wherever it is in the tree.
#1583
Comments
What's your use case for wanting cumulative Layouts? The reason I went for non-cumulative Layouts is because the use case I had in mind is having pages that have different layouts, for example the landing page typically has a difference layout than an admin panel. Closing but let's continue the discussion. Let's see if there is a better design to be discovered, and if there is, we can then open a clear roadmap feature request. (I've seen you started to personally sponsor Vike, thank you 💚) |
My thinking was to replicate what NextJS does with Layouts & nesting. I initially wasn't convinced with how they do it, but have since come around to the benefits of it. After developing a lot with NextJS I appreciate the feedback and background! I want to enable NextJS |
Yes, Next.js's support for nested layouts is quite neat. It's very much on the radar and I've a couple of neat ideas around this. (You can see some of it at #1459 but there is more to it I didn't write down yet.) In the meantime I guess the workaround depicated at https://vike.dev/Layout#nested-layouts is an acceptable (albeit clunky) solution? |
Description
Currently, creating a
Layout
nested under another folder with aLayout
file will fully replace the layout further up the tree with the one closest to the rendered page. Shouldn't the nestedLayout
component simply wrap thePage
component, and be mounted & rendered while inheriting all theLayout
's further up the tree (as thePage
component itself does?).TL:DR; Should the
Layout
component just simply wrap thePage
?The text was updated successfully, but these errors were encountered: