1 min readSep 28, 2018
Great article!
Would possibly opt for a more object centric approach to type check e.g.
const types = {
'SIMPLE_ACTION': {
result: action.payload
}
}
return types[action.type] || state
Great article!
Would possibly opt for a more object centric approach to type check e.g.
const types = {
'SIMPLE_ACTION': {
result: action.payload
}
}
return types[action.type] || state