Is there a way to pass formik form values from a child component to a parent component and handle form submission in parent component only. I have a use case where I\'m building
by using props you can achieve this.
Screen 1:
render(
<View>
<Screen2
onValueChange={() => {
this.setState({formProps: formProps});
}}
/>
<FormButton
formProps={this.state.formProps}
// @ts-ignore
onPress={formProps.handleSubmit}
// tslint:disable-next-line:no-duplicate-string
title={'checkout'}
/>
</View>
)
Screen 2:
if (onValueChange) {
onValueChange(formProps);
}