Reputation: 313
I'm trying to implement a form submit with react and redux. When i submit the data here, i want to get the results in actions (for redux purposes). I know we can do this by giving 'ref' in each input tags. but what i want to do it in react-redux method.
You can console and see the results obtaining as objects. but I'm not getting the right results.
Upvotes: 2
Views: 64
Reputation: 483
I guess the issue is that you are using <input
element with redux-form.
I recommend using <Field name="title" component="input" type="text" />
instead.
import { reduxForm, Field } from 'redux-form'
<Field name="title" component="input" type="text" />
console.log("i want the results right here ",form.movieForm.values.title);
Please NOTE: Its highly recommended to create a function within your component file which captures the input values and then calls the dispatch
action creator
Upvotes: 2