I have a feature reducer (slice reducer) called animals. I want to split these reducers to mammals, birds, fishes etc. This part is easy as I can simply use the ActionReducerMap
.
Now let's say the mammals' reducer's state is huge and I want to split it to several smaller reducers i.e cat's family, dog's family etc. the ActionReducerMap is not returning a reducer and is not nestable. I tried searching the web for solution or example but I couldn't find. My question, in short, is how to make multi-level nested reducers.
export interface AnimalsState{
mammals: fromMammals.mammalsState;
birds: fromBirds.birdsState;
}
export const reducers: ActionReducerMap<AnimalsState> = {
mammals: fromMammals.reducer,
birds: fromBirds.reducer
};
I want to split mammals reducer into smaller reducers.