Created
January 18, 2018 15:38
-
-
Save dragosdydy/6ddbb787a3021666e6540d61f07175d5 to your computer and use it in GitHub Desktop.
Store Container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import {connect} from "react-redux"; | |
import * as actionCreators from "../actions/index.js" | |
import Store from "../components/Store.js"; | |
class StoreCon extends Component { | |
componentDidMount() { | |
this.props.loadItems(); | |
} | |
render() { | |
return( | |
<Store data={this.props.data}></Store> | |
) | |
} | |
} | |
const mapStateToProps = (state) =>{ | |
return state; | |
}; | |
export default connect (mapStateToProps, actionCreators)(StoreCon); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment