immer'ified

This commit is contained in:
Ken
2019-01-30 15:06:03 -08:00
parent c44af2a38f
commit e3e977a98d
5 changed files with 33 additions and 8 deletions

View File

@@ -17,6 +17,11 @@ export const reducer = combineReducers<Store>({
remove(draft, action) {
delete draft[action.id];
return draft;
},
complete(draft, action) {
draft[action.id].completed = !draft[action.id].completed;
return draft;
}
}
),