If you have over 100 actions in your reducer that causes your file to have over 2k lines of code. How would you go about architecting the files, the state, and folder structure of your project.
let state = {
car: {
[id]: {
// Data is shared between different components
data: {
name: "",
model: "",
color: ""
msrp: 0,
purchasePrice: 0
},
// Shared state that all components care about
isSelected: false,
currentDriver: '',
// Special Component A State ( only Component A cares about these state updates
isSaved: false,
// Special Component B State ( only Component B cares about these state updates
hasTheCarBeenInAnAccident: false
},
...
}
}
This is an example that can be expanded where there may be more components that have their own special state updates towards that data