mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
immer'ified
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user