Releases: jaredpalmer/formik
Releases · jaredpalmer/formik
Release list
v0.9.3
Changes
- #168 Formik will no longer automagically reset the form when
initialValueschange. 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.
v0.9.2
v0.9.1
After some discussion validateOnBlur is now set to true by default.
v0.9.0
🎉 What's new?
- New
<Formik />component <Field />and<Form />helpersmapValuesToPayloadhas been removed- Improved warnings and error messages
- More docs and examples
- Website in the works...
🚧 Potentially breaking changes
validateOnChangenow defaults totruevalidateOnBlurnow defaults tofalse
🚨 🚨 Breaking change 🚨 🚨
Formik()has been renamedwithFormik(). (The namedFormikimport is now used for the component and not for the HoC)
Migrating from 0.8.x to 0.9.x
The Formik() HoC function in 0.8.x has been renamed withFormik() in 0.9.0. Since withFormik() is fully backwards compatible (in both plain JavaScript and TypeScript), you can safely do a search and replace and things will just work.
Before (0.8.x)
import { Formik } from 'formik'
const enhancer = Formik({ ... config ... })
...After (0.9.x)
import { withFormik } from 'formik'
const enhancer = withFormik({ ... config ... })
...v0.9.0-beta.2
- Fix type signature of
FormikBaginwithFormik()
v0.9.0-beta.1
- Fix TS type in
handleSubmitofwithFormik
Begin internal migration to 0.9.0 @palmerhq ...
v0.9.0-alpha.10
- Fix incorrect prop-type on
<Field />
v0.8.9
Patch
- #109 Fix bug is hoist statics (caused crash in RN)
- Moved to TravisCI instead of CircleCI
v0.8.8
Patch
- #103 Fixes
isValidlogic when form isdirty
v0.8.7
tl;dr
validationSchema can now alternatively accept a function that returns a Yup schema (instead of just a schema)
Old:
validationSchema?: Schema
New:
validationSchema?: Schema | ((props: Props) => Schema)