Skip to content

Instantly share code, notes, and snippets.

@dragosdydy
Created January 18, 2018 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragosdydy/6ddbb787a3021666e6540d61f07175d5 to your computer and use it in GitHub Desktop.
Save dragosdydy/6ddbb787a3021666e6540d61f07175d5 to your computer and use it in GitHub Desktop.
Store Container
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