I have text fields and need to do validation for it. Here is my code example:
export default function UserInformation() {
<form className={classes.root} autoComplete="off">
<div>
<div>
<TextField
className={classes.textField}
required
id="Email"
label="Email"
defaultValue=""
/>
</div>
</div>
</form>
}
What is the best way to do validation using react? I read about formik and yup, but I found that in my case, yup isn't effiecient way. Maybe anyone could suggest the best solution for ex. for email? Sorry, I'm new in fronted, so I don't know much.