Formik: preventDefault on handleSubmit using RN

Created on 21 Nov 2017  路  3Comments  路  Source: formium/formik

Hi guys,

https://github.com/jaredpalmer/formik/blob/master/src/formik.tsx#L464
e.preventDefault() not required when running in RN why you handle that? sometimes the handleSubmit might be call in async function like:

_onPressConfirm(e) {
  e.persist();
  this.setState({
    actionReject: false
  }, () => {
    this._form.handleSubmit(e);
  })
}

Any feedback will be appreciated, thanks !!

Most helpful comment

I would call submitForm() instead of handleSumit in RN

All 3 comments

I would call submitForm() instead of handleSumit in RN

Awesome, thanks @jaredpalmer !!!

@jaredpalmer I get the same error in v0.11.11 is it valid? In React Native section of Readme file it mentioned to use handleSubmit from props for onSubmit functionality ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredpalmer picture jaredpalmer  路  3Comments

emartini picture emartini  路  3Comments

Jungwoo-An picture Jungwoo-An  路  3Comments

jaredpalmer picture jaredpalmer  路  3Comments

ancashoria picture ancashoria  路  3Comments