jaredpalmer / formik

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

useFormik enableReinitialize prop emits infinite loop #3778

Closed cayolegal1 closed 1 year ago

cayolegal1 commented 1 year ago

Bug report

Enable reinitialize prop provoque infinite loop

Current Behavior

When I put an initial values initializer enter into infinite loop

The function that set the initial values

Screenshot 2023-05-23 at 13 25 26

Expected behavior

It should accept an initializer to set the initial values

Reproducible example

Video example https://github.com/jaredpalmer/formik/assets/73796018/8262314b-95af-4338-b875-b497dc486b01

Suggested solution(s)

Additional context

Your environment

Software Version(s)
Formik ^2.2.9
React 18.2.0
TypeScript x
Browser Google Chrome
npm/Yarn npm
Operating System MAC OS
quantizor commented 1 year ago

I think this is fixed now in latest?