redux-form is a very compelling library for providing redux bindings for forms in a react application, which should be super-convenient. Unfortunately, using the library\'s own
connectReduxForm
wraps your component with another component which handles passing in the fields
and handleSubmit
props, but you're blowing those away by passing them in yourself.
Try this instead (renamed the prop to onSubmit
):
And in ContactForm
, pass your own submit handler to the handleSubmit function provided by redux-form:
I recommend using the React developer tools to get a better picture of what's going on - you'll see how redux-form wraps your component and passes it a whole bunch of props, as documented in its README.