forked from liuweijw/RNLearning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppRedux2.js
More file actions
35 lines (26 loc) · 670 Bytes
/
Copy pathAppRedux2.js
File metadata and controls
35 lines (26 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import * as actionCreators from './src/redux/actions'
import RoutePage2 from './src/config/route2'
class ReduxRoute extends Component {
constructor(props) {
super(props)
}
componentWillMount() {
}
componentDidMount() {
}
render() {
return <RoutePage2 />
}
}
function mapStateToProps(state) {
return {
userInfo: state.reducers.userInfo
}
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(actionCreators, dispatch)
}
export default connect(mapStateToProps, mapDispatchToProps)(ReduxRoute)