Open greenkeeper[bot] opened 5 years ago
dependency
react-final-form was updated from 4.1.0
to 5.0.1
.dependency
react-final-form was updated from 4.1.0
to 5.0.2
.dependency
react-final-form was updated from 4.1.0
to 5.1.0
.dependency
react-final-form was updated from 4.1.0
to 5.1.1
.dependency
react-final-form was updated from 4.1.0
to 5.1.2
.dependency
react-final-form was updated from 4.1.0
to 6.0.0
.dependency
react-final-form was updated from 4.1.0
to 6.0.1
.dependency
react-final-form was updated from 4.1.0
to 6.1.0
.dependency
react-final-form was updated from 4.1.0
to 6.2.0
.dependency
react-final-form was updated from 4.1.0
to 6.2.1
.dependency
react-final-form was updated from 4.1.0
to 6.3.0
.dependency
react-final-form was updated from 4.1.0
to 6.3.1
.dependency
react-final-form was updated from 4.1.0
to 6.3.2
.dependency
react-final-form was updated from 4.1.0
to 6.3.3
.dependency
react-final-form was updated from 4.1.0
to 6.3.5
.dependency
react-final-form was updated from 4.1.0
to 6.4.0
.๐จ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! ๐ ๐๐จ ๐
Find out how to migrate to Snyk at greenkeeper.io
dependency
react-final-form was updated from 4.1.0
to 6.5.0
.
The dependency react-final-form was updated from
4.1.0
to5.0.0
.This version is not covered by your current version range.
If you donโt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Release Notes for v5.0.0
First to explain why this change was made... To manage subscriptions to the internal๐ Final Form instance, ๐ React Final Form has been using some legacy lifecycle methods that make the side effect of subscribing to an event emitter cumbersome. Such subscriptions are a perfect use case (no pun intended) for the new
React.useEffect()
hook. In an effort to modernize and future proof the library, the entire thing has been rewritten to use hooks.All the previous tests have been rewritten to use๐ React Testing Library, which is a superior way to test React components. None of the tests were removed, so all existing functionality from
v4
should work inv5
, including some optimizations to minimize superfluous additional renders that were made possible by hooks.Don't worry...there really aren't that many.
^react@16.8.0
. That's where the hooks are.FormRenderProps
andFormSpyRenderProps
have been removed. They have been spitting warnings at you sincev3
, so you've probably already corrected for this. The following applies to:batch
blur
change
focus
initialize
mutators
reset
Rather than spreading the
FormApi
into the render props, you are just givenform
itself.v4
v5
Field
will no longer rerender when thevalidate
prop. Note: it will still always run the latest validation function you have given it, but it won't rerender when the prop is!==
. This is to allow the very common practice of providing an inline=>
function as a field-level validation function. This change will break the very rare edge case where if you are swapping field-level validation functions with different behaviors on subsequent renders, the field will no longer rerender with the new validation errors. The fix for this is to also change thekey
prop onField
any time you swap thevalidate
function. See this test for an example of what I mean.Because it was so easy to do,๐ React Final Form now exports the
useField
anduseFormState
hooks that are used internally inField
andFormSpy
respectively. Literally the only thingField
andFormSpy
do now is call their hook and then figure out if you are trying to render with thecomponent
,render
, orchildren
prop.For example, before
v5
, if you wanted to create a custom error component that only rerendered whentouched
orerror
changed for a field, you'd have to do this:v4
...but now you can do:
v5
Not too groundbreakingly different, but these hooks might allow for some composability that was previously harder to do, like this
cleverdisgusting hack to listen to multiple fields at once.Go forth and hook all the things!๐ฃ
Special thanks to @Andarist for giving me such an extensive code review on #467.
Commits
The new version differs by 14 commits.
35b85b9
5.0.0
376fc69
Removed deprecated api from docs
c851c78
Removed misguided hooks docs
ffd2003
Hooks!!! (#467)
41d24d6
Added CLI example
45d5e97
Fixed anchor for selective example
bfa390e
Merge branch 'master' of github.com:final-form/react-final-form
230c169
Upgraded deps and fixed vulnerabily with tar package
cb17dc5
Added selective debounce demo
e8138a3
Fix onChange TS type signature (#438)
5f036e2
Update readme that warnings do not prevent submit (#447)
a3ca5f1
Fixed tslint errors
6cc9b12
Unify TS tests & backport removed typing improvements (#435)
d68a91f
v4.1.0
See the full diff
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donโt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper bot :palm_tree: