import React from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { userSignUp } from '../../actions/users' const mapDispatchToProps = (dispatch) => bindActionCreators({ userSignUp }, dispatch) class UserSignUp extends React.Component { constructor(props) { super(props); this.handleSubmit = this.handleSubmit.bind(this); } handleSubmit(e) { e.preventDefault(); this.props.userSignUp({ 'username': this.refs.username.value, 'password': this.refs.password.value, 'password_confirm': this.refs.passwordConfirm.value, }); } render() { return (