...

/

Thoughts on Folder Structure

Thoughts on Folder Structure

We'll cover the following...

There’s been lots of discussion over what constitutes a good folder structure for a Redux application. The typical approaches generally fall into two categories: “file-type-first” (folders like /reducers, /components, etc), and “feature-first”, also sometimes referred to as “pods”, “domain-based”, or “feature folders” (folders that each have all the file types for a given feature).

The original Redux examples use a “file-type-first” approach, but a lot of the recent articles and discussion have shown some convergence on the “feature-first” approach. There’s tradeoffs either way - “file-type-first” makes it really easy to do something like pulling together all the reducers, but the code for a given feature can be scattered around, and vice versa for “feature-first”.

My own current approach is mostly a “feature-first”-style approach. It’s got some similarities to the approach described by Max ...