Skip to content

Commit c68be4c

Browse files
add a todo model
1 parent 9347ce3 commit c68be4c

File tree

1 file changed

+1
-1
lines changed
  • ep11-switch-to-todo-part2/app/components

1 file changed

+1
-1
lines changed

ep11-switch-to-todo-part2/app/components/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class App extends React.Component {
2020
event.preventDefault();
2121

2222
var title = this.state.title;
23-
var newTodos = this.state.todos.concat(title);
23+
var newTodos = this.state.todos.concat({ title: title, done: false });
2424

2525
this.setState({ title: '', todos: newTodos });
2626
}

0 commit comments

Comments
 (0)