Skip to content

Selectively use _layouts #189

@arifluthfi16

Description

@arifluthfi16

When defining multiple _layout.tsx files in a parent-child folder structure (e.g., routes/_layout.tsx and routes/dashboard/_layout.tsx), the layouts are automatically nested, resulting in double-layered layouts instead of using only the child’s layout.

routes/
  _layout.tsx         // Parent layout
  dashboard/
    _layout.tsx       // Child layout
    index.tsx

the desired result: the index.tsx uses the closest child _layout.tsx

is there any workaround for this scenario?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions