Skip to content

Commit

Permalink
Add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Nov 13, 2020
1 parent 1650120 commit 0ad41eb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .changeset/two-fans-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'formik': patch
---

Renames `unstable_StrictField` to `FastField` and thus deprecates `<FastField shouldUpdate>` prop. If you need this functionality, use `useFormikContext()` and `useField()` in a custom component wrapped in `React.memo()` instead. In addition, and this is breaking, `FastField` is no longer passed `form` object in any render prop.

If you still need to access the `form` object in render use `FormikConsumer` like so:

```diff
- import { FastField } from 'formik'
+ import { FastField, FormikConsumer } from 'formik'

<FastField name="firstName">
- {({ field, meta, form }) => ( /* ... */ )}
+ {({ field, meta }) => (
+ <FormikConsumer>{form => /* ... */}</FormikConsumer>
+ )}
</FastField>
```

0 comments on commit 0ad41eb

Please sign in to comment.