adding step 7

This commit is contained in:
Ken
2019-02-17 17:19:14 -08:00
parent 64bd766619
commit b603f44b0d
16 changed files with 2270 additions and 1892 deletions

View File

@@ -1,5 +1,6 @@
import { Store } from '../store';
import { addTodo, remove, complete } from './pureFunctions';
import { clear } from '../../../step2-07/src/reducers/pureFunctions';
let index = 0;

View File

@@ -24,7 +24,7 @@ export function remove(state: Store, id: string) {
}
export function complete(state: Store, id: string) {
const newTodos = { ...this.state.todos };
const newTodos = { ...state.todos };
newTodos[id].completed = !newTodos[id].completed;
return {