-
As soon as you use the _route semantic, you break out of flat-routes. Forcing to only be able to use _layout implicitly forces be to nest more and more folders that I would like to have flat. I thought hybrid method is possible here. Did I miss something? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Examaple: This forces me to nest all _user.stuff into _user in order to add _user/_layout.tsx. It also forces me to move all the _user/_route.tsx co-located assets into the _user folder. Its bad also bad because typically you see folders first, files last. |
Beta Was this translation helpful? Give feedback.
Hmm.. interesting. With
remix-flat-routes
and the flat-folders convention (colocation), these are all synonmous: any file named index, route, layout, page or any file starting with_
.So
_user/_route
should be treated as a parent layout for_user.stuff/_route
. If not, then that is a bug.Remember,
_layout
only has a special meaning with hybrid routes in flat-files convention. Typically, you'd have_user.tsx
and_user.stuff.tsx
. If you want to user hybrid routes it would be_user+/_layout.tsx
and_user+/stuff.tsx
. Essentially,_user+/_layout.tsx
is equivalent to_user.tsx
Thanks again for these examples. It would help greatly if you could include your folder structure:
tree app/routes
and …