Is this folder structure ok?
Answered
Noronha posted this in #help-forum
NoronhaOP
@Ray just helped me out on bugfixing a navigation that showed two
The solution was to create route-groups thus, the file structure would have only one
So now my folder structure looks like this and I would like your opinion.
Is it good? What do you think on having multiple
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
6 Replies
@Noronha <@743561772069421169> 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?
yes its fine, the folder structure doesn't make any different to the app, it is personal preference
NoronhaOP
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