Vercel’s Post

Vercel reposted this

View profile for Lee Robinson, graphic

VP of Product at Vercel

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

Federico Vázquez

Sr. Software Engineer en Mercado Libre

1mo

File-based routers are getting worse every day

Peyman Ghaderkourehpaz

Senior Full stack developer ( PHP, Laravel, Vue.js, Tailwindcss )

1mo

Nice, do you mind to ask if you can share the git repository? if it’s not a private repository

Like
Reply
Thorsten Schaeff

DX Engineer at Supabase

1mo

Yoo Lee Robinson I like that format! What do you use for recording / editing and what resolution do you export at?

Like
Reply
Milkias Bekele

Full stack developer | Web And Mobile App Designer | Developer | Front end Developer | Backend Developer | Next Js | React Js | Typescript | Node Js |Shopify | Creative Developer and 3D Artist

1mo

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.

Federico P.

Create tech products that solve business problems | Co-Founder at Spinlab | Part-Time Tennis Player

1mo

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.

Like
Reply
Ravindra Sirvi

Next JS | Angular Developer | ASP.NET Core Expertise, Business Risk Management, Code Quality Assurance

1mo

Useful tips, thanks for sharing

This feature is fantastic

Like
Reply
James L.

Senior Frontend Developer

1mo

This is pure tutoring stuff

Like
Reply
Zayne Lovecraft

Software Engineer 2 at McDonald's

1mo

Personally I love this feature

Like
Reply
See more comments

To view or add a comment, sign in

Explore topics