Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance wise Formik not good #3400

Open
AkshayGadekar opened this issue Nov 6, 2021 · 4 comments
Open

Performance wise Formik not good #3400

AkshayGadekar opened this issue Nov 6, 2021 · 4 comments

Comments

@AkshayGadekar
Copy link

I am using formik for my signup form using material UI. That form only as four input text fields, as user fills up that form, when I console log form component rendering, it is in hundreds, on just one key stroke form component renders 3 times, if user types fast it takes time to reflect it in UI. Even for Blur event, it renders 3 times, finally I kept validateOnBlur: false to somehow optimize the form. But the point is for big forms, formik will definitely create performance issues, which I am afraid of. So I request formik team to please work on optimizing the performance, I love the library, performance is only big concern.

@johnrom
Copy link
Collaborator

johnrom commented Nov 8, 2021

Probably fixed by #3231

Edit: Don't thumbs down me for fixing it, when the owner never merged my fixes!! Meanies..

@lyin-vir
Copy link

I'm experiencing similar issues. I'm wondering if you used the FieldArray component. For me, the performance is fine when the form data is a flat object, but the rerender issue becomes significant when there's an array. Using validateOnBlur circumvents the issue but has a worse UX since the error won't go away unless the user deliberately clicks away from the field.

@paul-vd
Copy link

paul-vd commented Sep 8, 2022

Same issue here with the FieldArray it literally becomes un-useable with material ui fields if you have 10 or more

@edishu
Copy link

edishu commented May 15, 2023

Does Formik has something like FormSpy or subscriptions like react-final-form?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants