This repository was 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.9Release Notes
final-form/react-final-form
v6.5.9Compare Source
v6.5.8Compare Source
v6.5.7Compare Source
Type Fixes
v6.5.6Compare Source
Oops. My mistake.
v6.5.5Compare Source
Apologies... FF
v4.20.3contained anenginesvalue inpackage.jsonthat broke some builds.v6.5.4Compare Source
Bug Fixes
Type Fixes
v6.5.3Compare Source
Examples Fixes only
b3c79b8v6.5.2Compare Source
🎉 Support for React 17 as a peer dep! 🎉
Bug Fixes
Type Fixes
FormProps#867 #864v6.5.1Compare 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
FormValuesTypescript definition #806v6.5.0Compare Source
New Features
modifiedSinceLastSubmitflag to form and field state #799Bug Fixes
undefinedto Field component, an error is thrown #777 #450v6.4.0Compare 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.5Compare Source
Bug Fix
keepDirtyOnReinitializebefore initial values #706 https://github.com/final-form/final-form/pull/311v6.3.4Compare Source
Bug Fixes
Typing Fixes
v6.3.3Compare Source
Typing Fixes
v6.3.2Compare Source
v6.3.1introduced a bug.v6.3.2fixes it.Bug Fixes
v6.3.1Compare Source
Bug Fixes
isEqualcausing an infinite rerender loop #603 #517onChange#572 #569multiplevalue to custom components #545 #544onBlurdependencies #546Typing Fixes
FormProps['decorators']#629Build Fixes
v6.3.0Compare Source
New Features
validatingflag. Requiresfinal-form@4.16.1. #541Bug Fixes
formatOnBlurformat func #465v6.2.1Compare 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-formandreact-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
ab2e970v6.2.0Compare 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.0Compare Source
New Features
Usage:
Housekeeping
v6.0.1Compare Source
Bug Fixes
Type Fixes
UseFieldConfigandFieldProps#503v6.0.0Compare Source
This release contains very minimal, edge-case, breaking changes.
Bug Fixes
subscriptionprop, 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 thekeyprop, 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 | nullunion type. #400 Passingnullserved the purpose of disabling the defaultparseandformatfunctionality. If you need to disable the existingparseandformat, you can pass an identity function,v => v, toparseandformat.< v6
>= v6
v5.1.2Compare Source
df89fde89454a4v5.1.1Compare Source
Bug Fixes
Type Fixes
v5.1.0Compare Source
New Features
beforeSubmitcallback to enableformatOnBlurbefore submit #478 #470v5.0.2Compare Source
Bug Fixes
v5.0.1Compare Source
🤦♂️
99cef7dv5.0.0Compare 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
v4should 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. 🙄FormRenderPropsandFormSpyRenderPropshave been removed. They have been spitting warnings at you sincev3, so you've probably already corrected for this. The following applies to:batchblurchangefocusinitializemutatorsresetRather than spreading the
FormApiinto the render props, you are just givenformitself.v4
v5
Fieldwill no longer rerender when thevalidateprop. 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 thekeyprop onFieldany time you swap thevalidatefunction. See this test for an example of what I mean. There's also a sandbox demonstrating the issue:withReactFinalFormHOC 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
useFieldanduseFormStatehooks that are used internally inFieldandFormSpyrespectively. Literally the only thingFieldandFormSpydo now is call their hook and then figure out if you are trying to render with thecomponent,render, orchildrenprop.For example, before
v5, if you wanted to create a custom error component that only rerendered whentouchedorerrorchanged 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.