Open nikrb opened 6 years ago
changed feature to enhancement ... whilst we are here to learn, currently feeling well out of my depth.
How will reselect work with service worker? They both cache request data?
is it sufficient to have single global redux state for working and error, or does each 'module' require their own? Strictly speaking this is just frontend and not api related.
As far as I know your app should have only single state tree.
agreed. Does that tree have one global for working type situations and errors, or should each sub-tree have its own? e.g.
{
isWorking: false,
hasErrored: { false, message:""},
user: { ... },
houses: { ... },
...
}
OR
{
user: { isWorking: false, hasErrored: {false, message: "", userData: {...}},
houses: { isWorking: false, hasErrored: {false, message: "", housesData: {...}},
}
...
@nikrb 2nd one. Otherwise how do you differentiate the errors :( Although the user will probably be only using one of the state trees.... Idk?
investigate data format for api comms.
checkout twilio to see how they do it. useful link: redux dox normalizr with redux