Hi Im trying to create a Login page for an IOS app using React Native. Was following online guides and used Formik for validation. However, I ran into an issue when trying to implement handleSubmit.
<Formik
initialValues={{email: '',}}
onSubmit={value => Alert.alert('hello')}
validationSchema={LoginSchema}>
{({values, errors, handleChange, handleSubmit, setFieldTouched, touched}) => (
...
<TouchableOpacity **onPress={handleSubmit}**>
<Text style={styles.signUpButton}>Sign Up</Text>
</TouchableOpacity>
I tried doing this but received this problem in the bolded areas where I put handleSubmit into onPress in the TouchableOpacity
New contributor
wang hao zhen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.