https://codesandbox.io/s/zn812n05v4
const SyncValidationForm = props => {
const { handleSubmit, pristine, reset, submitting } = props;
return (
<div>
<LoadingBar />
<form onSubmit={handleSubmit}>
<Field
name="username"
type="text"
component={renderField}
label="Username"
/>
<Field
name="email"
type="email"
component={renderField}
label="Email"
/>
<Field name="age" type="number" component={renderField} label="Age" />
<div>
<button type="submit" disabled={submitting}>
Submit
</button>
<button
type="button"
disabled={pristine || submitting}
onClick={reset}
>
Clear Values
</button>
</div>
</form>
</div>
);
};