Skip to content
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

Route grouping support #1150

Closed
NuroDev opened this issue May 4, 2023 · 0 comments · Fixed by #1563
Closed

Route grouping support #1150

NuroDev opened this issue May 4, 2023 · 0 comments · Fixed by #1563
Milestone

Comments

@NuroDev
Copy link
Contributor

NuroDev commented May 4, 2023

What

Coming from trying out the new Next.js app directory (Not an apples to apples comparison I know) I've found one feature that has made structuring my file-based routes 100x easier to manage is route groups which allows you to group pages together in a directory & wrapping that directory name in brackets, like (foo) for example, to keep the route pathname the same isolate stuff to be scoped specifically.

Wondering what others thoughts on this feature are & if this is something that either Fresh could add or someone else could implement via a 3rd party module?

Why

One of the best examples I have found for this is isolating the "app" part of your application & the "marketing" page(s). So you have (marketing) that groups together say index.tsx, pricing.tsx, about.tsx, etc & then you have (dashboard) for the actual application which is all passed through a _middleware.ts to add, for example, some authentication check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants