This repository was archived by the owner on Jan 21, 2018. It is now read-only.
File tree 6 files changed +10
-13
lines changed
6 files changed +10
-13
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 17
17
"start" : " react-scripts start" ,
18
18
"build" : " react-scripts build" ,
19
19
"eject" : " react-scripts eject" ,
20
- "flow" : " flow"
20
+ "flow" : " flow" ,
21
+ "flow:stop" : " flow stop"
21
22
},
22
23
"eslintConfig" : {
23
24
"extends" : " ./node_modules/react-scripts/config/eslint.js"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class App extends Component {
15
15
render ( ) {
16
16
return (
17
17
< Provider store = { store } >
18
- < Counter />
18
+ < Counter text = "some text" />
19
19
</ Provider >
20
20
) ;
21
21
}
Original file line number Diff line number Diff line change @@ -18,20 +18,21 @@ type OwnProps = {
18
18
19
19
type StateProps = {
20
20
counter : number ,
21
- } ;
21
+ } & OwnProps ;
22
22
23
23
type DispatchProps = {
24
24
increase : ( ) => void ,
25
25
decrease : ( ) => void ,
26
26
} ;
27
27
28
- type Props = OwnProps & StateProps & DispatchProps ;
28
+ type Props = StateProps & DispatchProps ;
29
29
30
- const mapStateToProps = ( state : State ) : StateProps => ( {
30
+ const mapStateToProps = ( state : State , ownProps : OwnProps ) : StateProps => ( {
31
31
counter : state . ui . counter ,
32
+ ...ownProps ,
32
33
} ) ;
33
34
34
- const mapDispatchToProps = ( dispatch : Dispatch ) : DispatchProps => ( {
35
+ const mapDispatchToProps = ( dispatch : Dispatch , ownProps : OwnProps ) : DispatchProps => ( {
35
36
increase : ( ) => {
36
37
dispatch ( increase ( ) ) ;
37
38
} ,
Original file line number Diff line number Diff line change 1
1
// @flow
2
2
3
- import { applyMiddleware , createStore } from 'redux' ;
4
- import thunk from 'redux-thunk' ;
3
+ import { createStore } from 'redux' ;
5
4
6
5
import app from './reducers' ;
7
6
8
- const createStoreWithMiddleware = applyMiddleware (
9
- thunk ,
10
- ) ( createStore ) ;
11
-
12
- export default ( ) => createStoreWithMiddleware ( app ) ;
7
+ export default ( ) => createStore ( app ) ;
You can’t perform that action at this time.
0 commit comments