Explorar o código

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

Helder %!s(int64=6) %!d(string=hai) anos
pai
achega
eac2018ca7
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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
     }