this is my code:
<Formik
initialValues={{
email: 'eve.holt@reqres.in',
password: '',
}}
validationSchema={TodoInputSchema}
onSubmit={values => {
// handleToggle
// handleTodoInputSubmit
}}>
{({values, handleChange, handleSubmit, touched, errors}) => (
<View style={styles.inputContainer}>
<TouchableOpacity>
<Text
style={[
styles.completeAll,
todos.every(({complete}) => complete) &&
styles.completeFilterColor,
]}>
{String.fromCharCode(10003)}
</Text>
</TouchableOpacity>
<TextInput
editable={!loading}
returnKeyType="done"
onSubmitEditing={handleAddTodo}
blurOnSubmit={false}
placeholder="What needs to be done?"
style={styles.input}
onChangeText={newText => setNewTodoText(newText)}
value={newTodoText}
/>
)}
</View>
)}
</Formik>
as you can see i have toggle and Input. I am just wondering if it's possible to do maybe 2 submits on toggle and input for 1 Formik?