0
可以在其默認塊中使用reducer調用子縮減器嗎?調用子縮減器在父縮減器的默認塊中
function aReducer(state = {}, action) {
switch(action.type) {
case XYZ:
... // know what to do
default:
// don't know this action, let's delegate to the children
return {
sub1: subReducer1(state.sub1, action),
sub2: subReducer2(state.sub2, action)
}
}
}