1/* Using React-Redux Provider */
2import React from 'react';
3import { Provider, connect } from 'react-redux';
4
5const mapStateToProps = (state) => {
6 return { myProp: state.myProp }
7};
8const mapDispatchToProps = (dispatch) => {
9 return { propName: (param) => { dispatch(actionCreator(param)) } }
10};
11
12const Container = connect(mapStateToProps, mapDispatchToProps)(App);
13
14export default class AppWrapper extends React.Component {
15 render() {
16 return (
17 <Provider store={store}>
18 <Container />
19 </Provider>
20 );
21 }
22}