formik icon indicating copy to clipboard operation
formik copied to clipboard

Typing Performance Issues

Open lcsjunior opened this issue 3 years ago • 4 comments

We recently migrated several formik forms to React Native Web styled with NativeBase.

We consider: https://formik.org/docs/guides/react-native

However, we are encountering typing performance issues.

  • We remove all hooks: useField, useFormik and useFormikContext
  • We also removed all input componentizations.
  • We set: enableReinitialize={false} validateOnBlur={false} validateOnChange={false}
  • Tested with FastField.
  • Tested with formik v3.

Typing is still slow, more specifically where it has: FieldArray.

lcsjunior avatar Apr 29 '22 22:04 lcsjunior

+1

heberuriegas avatar Jul 15 '22 03:07 heberuriegas

I have also experienced with slow performance with Formlik, especially when we are in large form.

Hope the next generation of Formik can solve this issue.

codyng avatar Jul 20 '22 11:07 codyng

I saw that Formik only works when your code is in pure html. If using with some complex component lib e.g. MUI or NativeBase, the form will stink. Therefore, I advise against React removing the Formik indication from its documentation.

I concluded that it is better not to use any libraries in your forms. Use custom hooks.

lcsjunior avatar Jul 20 '22 15:07 lcsjunior

Sorry for the rant, but we used Formik with Bootstrap and it gave a false impression that it was a great lib. The project grew, and we switched Bootstrap to React Native Web. The typing problem was the most noticeable and to detect, test and refactor was a great stress.

lcsjunior avatar Jul 20 '22 15:07 lcsjunior