Skip to content

Commit 9b5dfa3

Browse files
pulled up getAllTodos method
1 parent 791d101 commit 9b5dfa3

File tree

1 file changed

+2
-7
lines changed
  • ep30-extract-form-into-componenet-from-app/app/components

1 file changed

+2
-7
lines changed

ep30-extract-form-into-componenet-from-app/app/components/App.jsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,19 @@ export default class App extends React.Component {
1313
super();
1414
this.state = { title: '', todos: [] };
1515

16-
this.getAllTodos();
16+
TodoActions.allTodos();
1717
}
1818

1919
componentDidMount () {
2020
var storeIsTellingUsThatDataHasChanged = () => {
2121
console.log("Store is telling us that data has change");
2222
var todos = TodoStore.getTodos();
23-
console.log("todos is");
24-
console.log(todos);
23+
console.log("todos :", todos);
2524
this.setState({todos: todos});
2625
}
2726
TodoStore.addChangeListener(storeIsTellingUsThatDataHasChanged);
2827
}
2928

30-
getAllTodos () {
31-
TodoActions.allTodos();
32-
}
33-
3429
handleClearCompleted (event) {
3530
var newTodos = this.state.todos.filter((todo) => { return !todo.done});
3631
this.setState({ todos: newTodos });

0 commit comments

Comments
 (0)