Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Oct 27, 2020
1 parent 91fd5e0 commit 5efd691
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/quiet-beans-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'formik': major
---

Added `parse`, `format`, and `formatOnBlur` to `getFieldProps` options, `<Field>`, and `useField`. Going forward, there is no reason aside from backwards compatibility to continue using either `formikProps.handleChange` or `formikProps.handleBlur`. These are both inferior to the `onChange` and `onBlur` functions returned by `getFieldProps()` which the ability to utilize `parse`, `format`, and `formatOnBlur`.

**Breaking Change**
Instead of just passing back `formikProps.handleChange` and `formikProps.handleBlur`, the `onChange` and `onBlur` handlers returned by `getFieldProps()` (and thus `useField`/`<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.

0 comments on commit 5efd691

Please sign in to comment.