Vercel reposted this
Next.js Tip: Route Groups Display one layout for most of your app (like this dashboard) but eject from the layout to style other routes differently (like /login). ↳ app/layout.tsx ↳ app/login/page.tsx (ejected) ↳ app/(dashboard)/layout.tsx ↳ app/(dashboard)/page.tsx
Nice, do you mind to ask if you can share the git repository? if it’s not a private repository
Yoo Lee Robinson I like that format! What do you use for recording / editing and what resolution do you export at?
I actually prefer this method of grouping routes over the previous approach of having my route go through the dashboard to reach the main page, which was challenging to manage since version 12. Ever since the release of Next.js 13, I have come to appreciate and now rely on this improved routing structure since i can have multiple files under the groups and add components for each as well. File based routers are getting easy to manage once you understand how to structure your projects.
Amazing explanation! Also, in this case /dashboard won't be added to the url so it's always a good idea to use the (routeGroups) mostly as organizational and not so much to eject things as it could be misleading.
Well said Lee! this is how tutorials should teach a concepts (straight to the point only focusing on the topic)
This feature is fantastic
Personally I love this feature
Useful tips, thanks for sharing
Sr. Software Engineer en Mercado Libre
1wFile-based routers are getting worse every day