This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
fix(deps): update dependency react-final-form to v6 #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.1.0
->6.5.9
Release Notes
final-form/react-final-form
v6.5.9
Compare Source
v6.5.8
Compare Source
v6.5.7
Compare Source
Type Fixes
v6.5.6
Compare Source
Oops. My mistake.
v6.5.5
Compare Source
Apologies... FF
v4.20.3
contained anengines
value inpackage.json
that broke some builds.v6.5.4
Compare Source
Bug Fixes
Type Fixes
v6.5.3
Compare Source
Examples Fixes only
b3c79b8
v6.5.2
Compare Source
🎉 Support for React 17 as a peer dep! 🎉
Bug Fixes
Type Fixes
FormProps
#867 #864v6.5.1
Compare Source
Hi, @erikras here. The primary reason for this update is to remove the Scarf dependency. I already did for Final Form and I thought React Final Form did not have its own dependency, but I was mistaken. Apologies for the delay.
You can read about my feelings about Scarf here:
Open Source Sustainability
Deps Fixes
Bug Fixes
Type Fixes
FormValues
Typescript definition #806v6.5.0
Compare Source
New Features
modifiedSinceLastSubmit
flag to form and field state #799Bug Fixes
undefined
to Field component, an error is thrown #777 #450v6.4.0
Compare Source
As of React
v16.13.0
, there has been a warning in React Final Form, Redux Form, and Formik. You can read @gaearon's explanation of it here: https://github.com/facebook/react/issues/18178#issuecomment-595846312This release, in conjunction with
final-form@4.19.0
, fixes this warning.Technically, a peer dependency change should be a major, breaking change, but these two libraries are so tightly coupled, that I'm only making it a "minor" update. Shout at @erikras on Twitter if this upsets you.
Bug Fix
v6.3.5
Compare Source
Bug Fix
keepDirtyOnReinitialize
before initial values #706 https://github.com/final-form/final-form/pull/311v6.3.4
Compare Source
Bug Fixes
Typing Fixes
v6.3.3
Compare Source
Typing Fixes
v6.3.2
Compare Source
v6.3.1
introduced a bug.v6.3.2
fixes it.Bug Fixes
v6.3.1
Compare Source
Bug Fixes
isEqual
causing an infinite rerender loop #603 #517onChange
#572 #569multiple
value to custom components #545 #544onBlur
dependencies #546Typing Fixes
FormProps['decorators']
#629Build Fixes
v6.3.0
Compare Source
New Features
validating
flag. Requiresfinal-form@4.16.1
. #541Bug Fixes
formatOnBlur
format func #465v6.2.1
Compare Source
Whilst it could be argued that updating a peer dependency is a "breaking change" – and it would be if it were on a large third party library, like React – it is the opinion of the library author that, due to the tight coupling between
final-form
andreact-final-form
, such a change, especially just for type definitions, is acceptable, even in a "patch" release. Feel free to yell at @erikras on Twitter if you vehemently disagree.Type Updates
ab2e970
v6.2.0
Compare Source
TypeScript fixes
New Features
For Typescript users, you can take advantage of JSX Generics, so you can specify the type of your form values or field value directly in the JSX call to
Form
,Field
, orFormSpy
. ForForm
, it will even infer the form values type if you provideinitialValues
.Behold this code:
v6.1.0
Compare Source
New Features
Usage:
Housekeeping
v6.0.1
Compare Source
Bug Fixes
Type Fixes
UseFieldConfig
andFieldProps
#503v6.0.0
Compare Source
This release contains very minimal, edge-case, breaking changes.
Bug Fixes
subscription
prop, causing the component to reregister with the Final Form instance. That is a very rare use case, and it was a lot of code to enable it. If you need to change your subscription prop, you should also change thekey
prop, which will force the component to be destroyed and remounted with the new subscription.parse={null}
andformat={null}
are no longer allowed. That was a bad choice of API design, which is probably why Flow doesn't allow theFunction | null
union type. #400 Passingnull
served the purpose of disabling the defaultparse
andformat
functionality. If you need to disable the existingparse
andformat
, you can pass an identity function,v => v
, toparse
andformat
.< v6
>= v6
v5.1.2
Compare Source
df89fde
89454a4
v5.1.1
Compare Source
Bug Fixes
Type Fixes
v5.1.0
Compare Source
New Features
beforeSubmit
callback to enableformatOnBlur
before submit #478 #470v5.0.2
Compare Source
Bug Fixes
v5.0.1
Compare Source
🤦♂️
99cef7d
v5.0.0
Compare Source
🎉 v5.0.0 – HOOKS!!! 🎉
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. There's also a sandbox demonstrating the issue:withReactFinalForm
HOC has been removed. Now you should use theuseForm()
hook if you'd like to get the 🏁 Final Form instance out of the context. To ease your transition, you can make your own with a single line of code:😎 New Hook API 😎
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.
Configuration
📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.