File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -13,24 +13,19 @@ export default class App extends React.Component {
13
13
super ( ) ;
14
14
this . state = { title : '' , todos : [ ] } ;
15
15
16
- this . getAllTodos ( ) ;
16
+ TodoActions . allTodos ( ) ;
17
17
}
18
18
19
19
componentDidMount ( ) {
20
20
var storeIsTellingUsThatDataHasChanged = ( ) => {
21
21
console . log ( "Store is telling us that data has change" ) ;
22
22
var todos = TodoStore . getTodos ( ) ;
23
- console . log ( "todos is" ) ;
24
- console . log ( todos ) ;
23
+ console . log ( "todos :" , todos ) ;
25
24
this . setState ( { todos : todos } ) ;
26
25
}
27
26
TodoStore . addChangeListener ( storeIsTellingUsThatDataHasChanged ) ;
28
27
}
29
28
30
- getAllTodos ( ) {
31
- TodoActions . allTodos ( ) ;
32
- }
33
-
34
29
handleClearCompleted ( event ) {
35
30
var newTodos = this . state . todos . filter ( ( todo ) => { return ! todo . done } ) ;
36
31
this . setState ( { todos : newTodos } ) ;
You can’t perform that action at this time.
0 commit comments