Skip to content

docs: clarify layout.js nesting behavior in route groups#95720

Open
ankurdotio wants to merge 2 commits into
vercel:canaryfrom
ankurdotio:docs/clarify-route-group-layout-nesting
Open

docs: clarify layout.js nesting behavior in route groups#95720
ankurdotio wants to merge 2 commits into
vercel:canaryfrom
ankurdotio:docs/clarify-route-group-layout-nesting

Conversation

@ankurdotio

@ankurdotio ankurdotio commented Jul 12, 2026

Copy link
Copy Markdown

What?

  • Adds one clarifying sentence (plus a link) to the "Organize routes without affecting the URL path" section in docs/01-app/01-getting-started/02-project-structure.mdx. No behavior change, docs text only.

Why?

  • The existing sentence says you can add a layout.js inside a route group folder to give it a different layout, but it doesn't say whether that layout.js nests inside the top-level app/layout.js or replaces it. Read in order, a reader hits this line before the page ever mentions removing the top-level layout, so it's genuinely ambiguous at that point in the page. The nesting behavior is only clarified later, in the "Creating multiple root layouts" section — and even then, it's explained for a different, more specific case (removing the top-level layout entirely to give each route group its own root layout).

How?

  • Added one sentence stating that this layout.js nests inside the top-level app/layout.js like any other layout by default, and linked to "Creating multiple root layouts" for readers who want the root-layout behavior instead.

Comment thread docs/01-app/01-getting-started/02-project-structure.mdx Outdated
…y suggestion from @icyJoseph

Co-authored-by: Joseph <sephxd1234@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants