fixing up step 2-4 exercise

This commit is contained in:
Ken
2019-03-02 23:07:25 -08:00
parent 8446b010c9
commit 46b89ff90b
4 changed files with 30 additions and 109 deletions

View File

@@ -20,13 +20,14 @@ export class TodoApp extends React.Component<any, Store> {
return (
<TodoContext.Provider
value={{
...this.state,
addTodo: this._addTodo,
remove: this._remove,
complete: this._complete,
clear: this._clear,
setFilter: this._setFilter,
edit: this._edit
...this.state
// TODO: put the missing functions into the context value
// addTodo: this._addTodo,
// remove: this._remove,
// complete: this._complete,
// clear: this._clear,
// setFilter: this._setFilter,
// edit: this._edit
}}
>
<Stack horizontalAlign="center">