Next.js Discord

Discord Forum

Is this folder structure ok?

Answered
Noronha posted this in #help-forum
Open in Discord
@Ray just helped me out on bugfixing a navigation that showed two loading.tsx on my nested pages: when I navigated to the form, we would see the list's loader and then the form loader.

The solution was to create route-groups thus, the file structure would have only one loading.tsx and not one after the other.

So now my folder structure looks like this and I would like your opinion.

Is it good? What do you think on having multiple _components folder? Any other general tips?
Answered by Ray
keep consistent and I would also put the component for that route inside its folder too. if the component use in multiple place, i would put it in src/components
View full answer

6 Replies

Maybe there's something more (or less) 'professional'?
Easier or Harder to organize stuff? I do understand personal preferences but...
it's my first project so, I dont mind tips if you got any 🙂
keep consistent and I would also put the component for that route inside its folder too. if the component use in multiple place, i would put it in src/components
Answer
Masai Lion
Try reading into the Atomic Design pattern