UNPKG

reactatouille

Version:

Reactatouille is a command-line tool to help quickly start and build a new React project, using Redux, Webpack, Gulp (You can add your own tasks, yo!), HMR/Hot Module Reload, Sass (architecture best practices), Jest, Enzyme, popmotion, Redux devtools (bro

37 lines (31 loc) 896 B
import React, { Component } from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { replay } from '../../actions' import HomePanel from '../../components/homePanel' import * as actions from '../../actions' import * as components from '../../components' import * as constants from '../../constants' const API = { actions, components, constants } class HomePanelContainer extends Component { render () { return ( <HomePanel replay={this.props.replay} lastUpdated={this.props[API.constants.NAME].lastUpdated} /> ) } } function mapStateToProps (state, ownProps) { return { [API.constants.NAME]: state[API.constants.NAME] } } function matchDispatchToProps (dispatch) { return bindActionCreators({ replay: replay }, dispatch) } export default connect(mapStateToProps, matchDispatchToProps)(HomePanelContainer)