DEV Community

Discussion on: React Form using Formik, Material-UI and Yup.

Collapse
 
baspa profile image
Bas van Dinther • Edited

Thanks for your quick reply. But what if I load the email and username from the state. How can I disable the touched option on those input fields? Because they don't have to be changed everytime but my button keeps disabled.

I tried some things like checking if the state is set and if its set then: this.props.setFieldTouched('email', true, false); but that doesn't seem to work.