github-actions
released this
14 Nov 19:46
·
203 commits
to main
since this release
Patch Changes
-
0ad41eb
#2903 Thanks @jaredpalmer! - Renamesunstable_StrictField
toFastField
and thus deprecates<FastField shouldUpdate>
prop. If you need this functionality, useuseFormikContext()
anduseField()
in a custom component wrapped inReact.memo()
instead. In addition, and this is breaking,FastField
is no longer passedform
object in any render prop.If you still need to access the
form
object in render useFormikConsumer
like so:- import { FastField } from 'formik' + import { FastField, FormikConsumer } from 'formik' <FastField name="firstName"> - {({ field, meta, form }) => ( /* ... */ )} + {({ field, meta }) => ( + <FormikConsumer>{form => /* ... */}</FormikConsumer> + )} </FastField>