chapter icon indicating copy to clipboard operation
chapter copied to clipboard

New naming convection for Next.js page

Open Sboonny opened this issue 2 years ago • 3 comments

Here is the original blog: https://nextjs.org/blog/layouts-rfc

And here is TD;LR

Layout components should be named layout.tsx, instead of our index.tsx

Page components should be named page.tsx instead of index.tsx

there is no need for _app.tsx and _documents.tsx

The rest of the post is talking about server, so we can talk about later


I have opened an issue, to know if we should be mindful of this.

Sboonny avatar Sep 10 '22 08:09 Sboonny

There's likely to be a migration guide once this makes it into a stable release of Next. It doesn't sound like there's an awful lot we'll need to do, so we can just wait until it's necessary.

ojeytonwilliams avatar Sep 12 '22 07:09 ojeytonwilliams

Closing this, because it is early to discuss it and I don't want people to start creating pull requests changing chapter files

Sboonny avatar Sep 16 '22 12:09 Sboonny

Reopened, because next13 is stable, although the app/dir isn't, we don't need to use it until it's.

Sboonny avatar Apr 18 '23 14:04 Sboonny