Skip to content

bug: _ suffix (layout exclude) renders the layout #4386

Closed
@tresorama

Description

@tresorama

Which project does this relate to?

Router

Describe the bug

Here is a Codesandbox that you can open to see the issue.

AFAIK from the docs:

_ Suffix | Route segments with the _ suffix exclude the route from being nested under any parent routes.

But you can see that Layout Red - Page B, even if the filename is _layout-red.page-b_.tsx (with _ suffix) still render the layout.

Your Example Website or App

https://codesandbox.io/p/devbox/h928ss

Steps to Reproduce the Bug or Issue

  1. Open Sandbox
  2. Click on Sidebar > Home and look a page without a layout
  3. Click on Sidebar -> Layout Red Page A and look a page under layout red
  4. Click on Sidebar -> Layout Red Page B and look the affected page, that should not render the layout but it does

Expected behavior

_layout-red.page-b_.tsx should not rendere the layout _layout-red.tsx

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions