Skip to content

Is there a way to have a layout that doesn't get matched against? #60

Answered by kiliman
mmacdonaldOCP asked this question in Q&A
Discussion options

You must be logged in to vote

Hi great question. Typically if you want a shared layout without making it an actual route, you'd add a pathless layout as a parent route.

_shared/
  _layout.tsx
  signup/
    account-link/
    ...

Perhaps I could add a convention that would let you add a prefix like ! to say wrap this with a pathless layout.

signup/!_layout.tsx

That might be tricky since I would have to check for that before processing any child routes since they would have to be nested under the fake pathless layout.

Anyway I hope I answered your question.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mmacdonaldOCP
Comment options

Answer selected by mmacdonaldOCP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants