News for hackers. Stuff that matters.
Re:Next.js Layouts RFC: Nested routes and layouts, designed ... by codefined on Monday May 23, 2022 @06:25PM (#31485605)
Not seeing it in the article, but how are you handling `index` routing in the `app` folder? If you are putting it in the top directory (e.g. `/app/index.js`), is it not able to get a custom `layout.js` file (as that position is used for the global variant)?

If it's in an `index` folder (e.g. `/app/index/page.js`), how would one create a route for `example.com/index`?

Re:Next.js Layouts RFC: Nested routes and layouts, designed ... by leerob on Monday May 23, 2022 @07:38PM (#31486207)
The current working idea is that you wouldn't use index.js. There are Layout Components and Page Components, both explicitly defined by `layout.js` and `page.js`. We are open to other opinions here, though. Others have shared similar sentiment: https://github.com/vercel/next.js/discussions/37136