This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[✨] Nested named layout #88
Labels
[STAGE-2] incomplete implementation
Remove this label when implementation is complete
[STAGE-2] not fully covered by tests yet
Remove this label when tests are verified to cover the implementation
[STAGE-2] unresolved discussions left
Remove this label when all critical discussions are resolved on the issue
[STAGE-3] docs changes not added yet
Remove this label when the necessary documentation for the feature / change is added
[STAGE-3] missing 2 reviews for RFC PRs
Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Is your feature request related to a problem?
Qwik supports named layout with the following folder structure:
However, it seems like it does not support nested named layout with the following folder structure:
In the above example, there are two layouts that apply themselves around the
/contact-1
page component:src/routes/layout-narrow2.tsx
src/routes/[email protected]
We should be able to define the parent layout of a child layout in Qwik City like
[email protected]
. However, as of[email protected]
,[email protected]
does not work and/routes/contact/layout-narrow2.tsx
is forced to always render with/routes/layout.tsx
.Describe the solution you'd like
To be able to define a named layout for another named layout as Qwik currently supports only defining a named layout to
index.{tsx,mdx}
instead of alayout.tsx
, for instance,Expected behavior
We should be able to define named layout for layouts.
Actual behavior
We can only specify named layout in an
index.{tsx,mdx}
file like[email protected]
andlayout-narrow.tsx
is always defaulting to alayout.tsx
at upper level.Describe alternatives you've considered
Avoid using nested named layout
Additional context
No response
The text was updated successfully, but these errors were encountered: