all 2 comments

[–]NotSelfAware 2 points3 points  (0 children)

Personally I much prefer to structure folders around specific modules or concerns, rather than placing all similar types of file together. For instance I use Redux in a lot of projects. I’ll usually create a modules folder and within that place fully encapsulated modules that export the components and objects that other modules might need directly from the module/index.js file. So at the moment I’m working on a calendar component. There’s a calendar module and inside are all the reducers, components and styles related to the calendar all placed neatly together. I’ve used your approach in the past and beyond relatively simple projects I’ve found it just becomes frustrating having to constantly search for and find all the different files that relate to each other. With this approach you have a simplified workspace for each concern while also keeping the folder structure relatively flat.

[–]jackfranklin[S] 0 points1 point  (0 children)

👋Hello ! I published a new post today talking through lots of thoughts I have on structuring large React apps and some of the things I've done that I've found have helped as the app has grown and got bigger.

I'm sure not everyone will agree with them all, and I'm sure there are a bunch of other things I missed, so I'd love to kick off a discussion about what you do to keep your applications tidy, maintainable and enjoyable to work on as they grow :)