File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import Header from './Header' ;
3
3
import Body from './Body' ;
4
- import { root , Container } from 'redux' ;
5
- import { todoStore } from './stores/index' ;
6
- import { addTodo } from './actions/index' ;
4
+ import { root } from 'redux' ;
7
5
8
6
@root
9
7
export default class TodoApp {
10
8
render ( ) {
11
9
return (
12
- < Container stores = { todoStore } actions = { { addTodo } } >
13
- { props =>
14
- < div >
15
- < Header addTodo = { props . addTodo } />
16
- < Body todos = { props . todos } />
17
- </ div >
18
- }
19
- </ Container >
10
+ < div >
11
+ < Header />
12
+ < Body />
13
+ </ div >
20
14
) ;
21
15
}
22
16
}
Original file line number Diff line number Diff line change 1
1
import React , { PropTypes } from 'react' ;
2
+ import { container } from 'redux' ;
3
+ import { todoStore } from './stores/index' ;
2
4
5
+ @container ( {
6
+ stores : todoStore
7
+ } )
3
8
export default class Body {
4
9
static propTypes = {
5
10
todos : PropTypes . array . isRequired
Original file line number Diff line number Diff line change 1
1
import React , { PropTypes } from 'react' ;
2
+ import { container } from 'redux' ;
3
+ import { addTodo } from './actions/index' ;
2
4
5
+ @container ( {
6
+ actions : { addTodo }
7
+ } )
3
8
export default class Header {
4
9
static propTypes = {
5
10
addTodo : PropTypes . func . isRequired
You can’t perform that action at this time.
0 commit comments