javascript
Add Input fields in Redux Form
You can add an input field in a redux form using a Field tag that can be imported from redux-form
import { Field, reduxForm } from 'redux-form';
<Field
name="textField"
component="input"
type="text" //This can be password, email, number, etc
placeholder="Text type field"
/>
In the code snippet, we have added an input field that has type text. You can add the password input field as below:
Password Input Field
To add a password input field in redux form you can assign password value to type attribute.
<Field
name="textField"
component="input"
type="password"
placeholder="Text type field"
/>
Email Input Field
To add an email input field in redux form you can assign email value to type attribute.
<Field
name="textField"
component="input"
type="email"
placeholder="Text type field"
/>
Number Input Field
To add a number input field in redux form you can assign 'number' value to the type attribute.
<Field
name="textField"
component="input"
type="number"
placeholder="Text type field"
/>
Was this helpful?
Similar Posts