4 ms·
I tend to favor organizing by feature... /feature/subfeature/(constants|actions|reducers|api|controls) This way features can be N layers deep, a given fea
by tracker1 11y ago
I tend to favor organizing by feature...
/feature/subfeature/(constants|actions|reducers|api|controls)
This way features can be N layers deep, a given feature may not have all of those pieces, some may be data only, some may have actions that are called from other features... in the end, the data/controls etc are closer to the feature that binds them. Api is to abstract any foreign system integration (api calls), where actions (action creators) may use it, and the reducers manage the result... Redux workflow, variance on structure.
Tends to work pretty well that way. Actions/reducers may listen/dispatch those defined under other features... again, it's the shape of the data and application that defines these features and their structure.