jaredpalmer / formik

Build forms in React, without the tears 😭
https://formik.org
Apache License 2.0
33.96k stars 2.79k forks source link

Each FieldArray cause extra renders even when empty #2530

Open rstrand opened 4 years ago

rstrand commented 4 years ago

🐛 Bug report

Current Behavior

Each FieldArray causes extra renders even when they are empty. This problem is exacerbated in my application as I have several nested arrays which can cause a single keystroke to cause 80+ renders.

Rolling back to Formik v1 fixes this problem.

Expected behavior

FieldArray's shouldn't cause additional form renders.

Reproducible example

https://codesandbox.io/s/pensive-wildflower-wftlp

Additional context

Your environment

Software Version(s)
Formik 2.1.4
React 16.13.1
TypeScript 3.7.5
Browser Chrome 83
Yarn 1.22.4
Operating System macOS 10.14.6
MaximSagan commented 4 years ago

This behavior is due to an issue that I just logged, #2542.