Last active
December 22, 2017 22:34
-
-
Save jmlavoier/a2b6fa935b1e1907344c970750514b7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<Field | |
component={InputField} <!-- component to render --> | |
type="text" <!-- InputField particular prop --> | |
name="name" <!-- commom prop for all --> | |
validate={validateName} <!-- callback function with value --> | |
value={this.state.name.value} <!-- state value --> | |
isValid={this.state.name.isValid} <!--state bool isValid --> | |
onChange={::this.handleChange('name')} <!-- handleChange the state --> | |
/> | |
<Field | |
component={SelectField} | |
name="sexo" | |
validate={validateSexo} | |
value={this.state.sexo.value} | |
isValid={this.state.sexo.isValid} | |
options={['masculino', 'feminino']} | |
onChange={::this.handleChange('sexo')} | |
/> | |
<Field | |
component={TextareaField} | |
name="about" | |
validate={validateAbout} | |
value={this.state.about.value} | |
isValid={this.state.about.isValid} | |
onChange={::this.handleChange('about')} | |
/> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment