You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having said that, there seems to be one item, the component folder and files structure, that imo should be added as well.
I currently am noticing folks colocating more and more their components into their app folder. I feel as though this should be the default recommendation and if there are any corner cases they can be mentioned below the structure recommendation.
Also, I have noticed about a 50/50 split of folks placing an index.ts file in their component folder and exporting from there.
I'm completely impartial to how this is handled but a recommendation from the Structure page would be extremely helpful.
Let's get this rolling and then I'll do a quick PR.
Is there any context that might help us understand?
The above description describes the issue and possible solution.
Does the docs page already exist? Please link to it.
Hi, thanks for the suggestion, but the linked page is aimed to give you a description of the Next.js conventions/required file structure. Having a components folder is not required and might confuse if we recommend it. I.e. you can also colocate your components right next to page.tsx files as well, as these are ignored by Next.js.
Whether you want to use a components folder should remain a project-level consideration.
That is illogical as the entire point of using a react project is fundamentally based upon the use of components. Your docs even suggest this. Are you suggesting that there should not be any components used to build a Nextjs project?
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What is the improvement or update you wish to see?
First of all. This is hands down the best doc structure recommendations I've ever seen. 馃憦馃徎 Amazing work!
Having said that, there seems to be one item, the
component
folder and files structure, that imo should be added as well.I currently am noticing folks colocating more and more their
components
into theirapp
folder. I feel as though this should be thedefault
recommendation and if there are any corner cases they can be mentioned below the structure recommendation.Also, I have noticed about a 50/50 split of folks placing an
index.ts
file in their component folder and exporting from there.I'm completely impartial to how this is handled but a recommendation from the
Structure
page would be extremely helpful.Let's get this rolling and then I'll do a quick PR.
Is there any context that might help us understand?
The above description describes the issue and possible solution.
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/getting-started/project-structure
The text was updated successfully, but these errors were encountered: