import React, { Component } from 'react' import { connect } from 'react-redux' import { Button, Container, Input } from 'rebass' import { actions } from '../redux/players' class HomePage extends Component { play = (e) => { e.preventDefault() if (this._username !== undefined) { this.props.chooseUsername(this._username) } } render() { return ( this._username = e.target.value} /> ) } } const mapStateToProps = (state) => ({}) const mapDispatchToProps = { chooseUsername: actions.chooseUsername } export default connect(mapStateToProps, mapDispatchToProps)(HomePage)