Should we make app dir nested route opt in rather than opt out #69742
Unanswered
boompikachu
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to suggest an opt-in nested route. I think it would help organize the folder structure more easily.
let's say we have the following:
At first glance, user might think /banner is a nested route but in reality, it is just a component with some utils inside. We can fix it by moving into a components (or _components) folder instead but sometimes, with little components, we just want to leave it outside.
But what if we force all route to start with a specific character? (in this case an * or maybe an _)
it would highlight all the routes when navigating through the tree which, in my opinion, really helps differentiate between which folder is route groups and which is not. I also prevent us from naming all other folder with _ to opt out of nested route.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions