formik@3.0.0-next.0
Pre-releaseMajor Changes
-
5efd691
#2255 Thanks @jaredpalmer! - Addedparse
,format
, andformatOnBlur
togetFieldProps
options,<Field>
, anduseField
. Going forward, there is no reason aside from backwards compatibility to continue using eitherformikProps.handleChange
orformikProps.handleBlur
. These are both inferior to theonChange
andonBlur
functions returned bygetFieldProps()
which the ability to utilizeparse
,format
, andformatOnBlur
.Breaking Change
Instead of just passing backformikProps.handleChange
andformikProps.handleBlur
, theonChange
andonBlur
handlers returned bygetFieldProps()
(and thususeField
/<Field>
) are now scoped to the field already and now accept either a React Synthetic event or a value. In the past, you could need to curry the handler with the string name of field to get this functionality. This likely doesn't impact many users, but it is technically breaking nonetheless.