score:2

Accepted answer

first, mapstatetoprops is not something exclusive to redux form, it is from redux/react-redux.

the problem with your code is that you are passing the signin component to the connect function, and not the redux-form's hoc component you've just created.

let signinform = reduxform(
   { form: "signinform" })(signin);

export default signinform = connect(mapstatetoprops, null)(signin);

signin is not a redux-form component so it will not have the handlesubmit function.

what you want is this:

export default connect(mapstatetoprops, null)(signinform);

score:1

the issue here is that you're passing your original component to connect.

const reduxformsigninform = reduxform({ form: "signinform" })(signin);

const connected reduxformsigninform = connect(mapstatetoprops)(reduxformsigninform);

an alternate way to write this would be to use compose, which you can import from redux.

import { compose } from 'redux';

export default compose(
  connect(mapstatetoprops),
  reduxform({ form: "signinform" })
)(signin);

Related Query

More Query from same tag