Notes:
-
All actions should go in
/actions.jsand all constants should go in/constants.js(this is the one place where we deviate from keeping things together, as having all actions in one place makes understanding the entire application's potential state changes very straightforward) -
The
/index.jsshould mount the application, set up the store, and contain application routing -
The
/**/index.jsin each child folder should contain that part of the state tree's reducer, action constants, and export/**/component.jswrapped byconnect()fromreact-redux -
If using Stylus,
/style.stylcan glob import all child/**/*.stylfiles so explicit tracking of them is not necessary -
Each child
/**/*.stylshould only contain styles relevant to that view, without side effects -
The child
/**/component.jsshould be as simple and "pure" as possible, preferring stateless syntax where possible -
If the child does not need a reducer ("pure" subview),
/**/component.jscan be skipped and si