Browse Source

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

Helder 6 years ago
parent
commit
eac2018ca7
1 changed files with 7 additions and 0 deletions
  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
             todoList
           }
           }
         }
         }
+        case "TODO_DELETE_ALL":{
+          return {
+            ...state,
+            todoList:[]
+          };
+
+        }
         default:
         default:
             return state
             return state
     }
     }