Changes
- #168 Formik will no longer automagically reset the form when
initialValues
change. I added this feature thinking it would be desirable on most apps. However, it appears that I was wrong and it created headaches for people using Redux to get their initial values. Sorry about that. That's on me. If you still want this behavior, pass<Formik enableReinitialize={true}
/> orwithFormik({ enableReinitialize: true })(...)
. \
If you want to have more control, initialValues
(i.e. initialValues
as of first mount) is now available in props
, so you can use that to control reset behavior with more granularity if you want to.
Bug Fix / Optimization
- #176 Run validations on methods in a callback. This allows React to batch updates and avoid a double render! Thanks @jontansey
New contributors 🎉
What's coming?
- There is some progress on synchronous Yup. This would be game changing for testing.
- I benchmarked Redux Form vs. Formik and its not even a competition. I am working on a blog post this weekend. In the process, though, I also found a way to very safely optimize vanilla
<Field/>
(i.e. one's without custom component's) usingshouldComponentUpdate
. I have not yet released this because of I want to wait on #182 and #167 . Those on the bleeding edge can copy and paste the code from #185 . - Website is in the works.