News for hackers. Stuff that matters.
Re:Next.js Layouts RFC: Nested routes and layouts, designed ... by gitgud on Monday May 23, 2022 @07:20PM (#31486076)
I like that you have thought about incremental adoption. However it looks like you're effectively deprecating the "/pages" directory. Which kind of sucks, as it's much more informative name, than the new generic "/app" folder.

Also, does this mean you cannot have a page named "layout" anymore?

Lastly, I appreciate all the hard work that goes into nextjs, it's a great developer experience and my goto framework.

Re:Next.js Layouts RFC: Nested routes and layouts, designed ... by leerob on Monday May 23, 2022 @07:37PM (#31486196)
Part of the thinking behind `app/` is that each section of your application can become its own app. Separate layouts, separate data fetching, and more. `pages/` was mapped very linearly to routes – `pages/index.js` was the index route. But with `app/`, that is not the case.

That's a good point about having a route `/layout` – I will check with the team about that.

Re:Next.js Layouts RFC: Nested routes and layouts, designed ... by migueloller on Monday May 23, 2022 @08:37PM (#31486641)
Since segments are determined by folders, you should be able to do `/layout/page.js` for a `/layout` route.