-
-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Add support for pathless layout routes #237
Comments
I think its a good idea to support this. Was also thinking about supporting a folder that can be co-located in the routes folder but not be picked up as a route, such as |
@brandonroberts I actually ran into this today. I was trying to put components that were only used in a specific route in the same folder as the route. Similar to what you describe or what the Remix docs describe here: https://remix.run/docs/en/v1/file-conventions/route-files-v2#folders-for-organization |
@brandonroberts are you planning on creating an RFC for hiding co-located in the routes folders? Or even better, are you already working on adding this feature? |
I updated the issue description - instead of two underscores ( |
@goetzrobin I haven't but I'll create one for the ability to co-locate files within the routes folder. You're welcome to create one also if you already have a use case. |
@markostanimirovic I like it for the consistency. My other thought is it might be confusing if we want to support aux routes in the future that use the parenthesis in the URL. We could probably define those as /path(outlet-name) with /(path) being used for pathless routes. |
In case we want to support auxiliary routes, it may make sense to do a breaking change and use the |
You're saying define pathless routes as __index.ts instead of index.ts or (index.ts)? I'd prefer to keep those as is and come up with a different convention for aux routes as they are much more niche in terms of usage. |
Actually
Agree. 💯 |
Which scope/s are relevant/related to the feature request?
router
Information
This feature can be useful to group related pages into the same folder without adding additional segments to the URL.
For the following structure:
we'll be able to access the
login
andsignup
pages by using/login
and/signup
URLs. In the same way, we should be able to define a layout/shell component for pages in the(auth)
folder:Pathless layout routes in Remix: https://remix.run/docs/en/v1/guides/routing#pathless-layout-routes
Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: