I know there are a few questions about the response-redux project code structure, but I hope to discuss a different approach. Therefore, the main libraries that we are going to use are: webpack - react - redux -mocha - karma.
The classic folder structure for this is as follows:
js
βββ actions
β βββ action-for-componentA.js
βββ components
β βββ componentA.js
βββ reducers
β βββ reducer-for-componentA.js
βββ stores ...
This is similar to what everyone else and all generators do. But I feel that this is not a reactive way of structuring a project. The focus should be on the component, not the individual reaction or contraction constructs. I would like to think about it this way when you need to change the button in PageX that is contained in the component hierarchy that starts with ComponentX -> ChildOfX - I should be able to move directories the same way.
Instead of having a components folder with all the components thrown inside it, I would like to have something like:
js
βββ PageX
β βββ action-for-pagex.js
βββ componentX.js
βββ containerX.js
βββ reducerX.js
βββ children
βββ childrenC
βββ childrenB
βββ componentB.js
βββ reducerB.js
βββ ...
βββ PageY
β βββ ...
βββ PAgeZ
β βββ ...
It will be easier to go through, and it makes sense when you think you are βreactingβ. Can anyone see anything that might go wrong with this approach?
: http://engineering.kapost.com/2016/01/organizing-large-react-applications/