Przeglądaj źródła

feat(reducers): add TODO_DELETE_ALL action type returning empty todoList

Helder 6 lat temu
rodzic
commit
eac2018ca7
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      src/app/store/reducers/toDoReducer.js

+ 7 - 0
src/app/store/reducers/toDoReducer.js

@@ -26,6 +26,13 @@ export default function reducer(state=initialState, action){
             todoList
           }
         }
+        case "TODO_DELETE_ALL":{
+          return {
+            ...state,
+            todoList:[]
+          };
+
+        }
         default:
             return state
     }