freeCodeCamp / chapter

A self-hosted event management tool for nonprofits
BSD 3-Clause "New" or "Revised" License
1.92k stars 360 forks source link

New naming convection for Next.js page #1519

Open Sboonny opened 2 years ago

Sboonny commented 2 years ago

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.

ojeytonwilliams commented 2 years ago

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.

Sboonny commented 2 years ago

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

Sboonny commented 1 year ago

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