-
Hey guys! I have a question about the project structure, I would appreciate if anyone can share your experience. We have a project with more than 50 screens and hundreds of components. The main question is how to group them?
, etc. But this structure doesn't look clean. What is your approach? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hey @stanwrkt! Maintain a well organized project structure is a hard thing, even more when multiple developers work in the same project.
You can have a look at the source code of the app for the Infinite Red Chain React Conference. Hope it's helped✌️ |
Beta Was this translation helpful? Give feedback.
-
Hey @stanwrkt
That was a terrible experience because you constantly are looking for files (and obviously none of the naming was aligned with the type of file like I like the approach of @donnes because it follows some advice of the react documentation about colocation
|
Beta Was this translation helpful? Give feedback.
-
Here is the solution that we adopted, https://github.com/straw-hat-team/adr/tree/master/adrs/5541831634 has been successfully implemented in multiple codebases with different sizes. It tries to colocate, and embrace high cohesion, you Things being around the route also embrace strong colocation which leans in the previous one, also looking at the routing you can tell where you are at (in mobile is more flatten but still). Lastly, also gives you the exact same structure in a fractal pattern way so you don't need to relearn based on the developer once you visit a new directory. The directories cover most of the use cases that you will face in a React codebase. I hope it works, share some feedback or questions about it. |
Beta Was this translation helpful? Give feedback.
Hey @stanwrkt!
Maintain a well organized project structure is a hard thing, even more when multiple developers work in the same project.
But answering your question, particularity I like more to organize the components separately. Something like this:
You can have a look at the source code of the app for the Infinite Red Chain React Conference.
Hope it's helped✌️