Slide 23
Slide 23 text
An action is process by a reducer function
I N F E R T Y P E S C O N D I T I O N A L L Y
switch (action.type) {
case NotesActionTypes.LoadNotesSuccess:
return setNotes(action.payload, slice);
...
function setNotes(notes: Note[], slice: NotesSlice): NotesSlice {
return {
...slice,
entities: notes
};
}
Case Reducer