All Versions
Latest Version
Avg Release Cycle
34 days
Latest Release
1373 days ago

Changelog History
Page 2

  • v6.2.1 Changes

    June 14, 2019

    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 and react-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


  • v6.2.0 Changes

    June 14, 2019

    πŸ›  TypeScript fixes

    • 0️⃣ Use the same default for FormValues type in all declared types (#525)
    • 0️⃣ Replace empty object default type with any object (#526)
    • πŸ”¨ Refactor getContext back to a simple context file (#524)

    πŸ†• New Features

    • Strongly typed field values (#530)
    • βž• Added tsx generic typings for Field, Form, and FormSpy components (#522)

    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, or FormSpy. For Form, it will even infer the form values type if you provide initialValues.

    Behold this code:

    interface MyValues { firstName: stringlastName: string}const initialValues: MyValues = { firstName: 'Erik', lastName: 'Rasmussen'}const onSubmit = (values: MyValues) =\> { ajax.send(values) }
    {/\* Typescript will complain if the type of initialValues is not the same as what is accepted by onSubmit\*/} \<Form onSubmit={onSubmit} initialValues={initialValues}\> {({ handleSubmit, values }) =\> { // πŸ’₯ Type of values is inferred from the type of initialValues πŸ’₯return ( \<form onSubmit={handleSubmit}\> {/\* 😎 Field values are strongly typed using JSX generics 😎 \*/} \<Field\<string\> name="firstName" component={TextInput} /\> \<Field\<string\> name="lastName" component={TextInput} /\> \<Field\<number\> name="age" component={NumberInput} /\> \<button type="submit"\>Submit\</button\> \</form\> ) }} \</Form\>


  • v6.1.0 Changes

    June 11, 2019

    πŸ†• New Features

    • πŸ‘ Allowed swappable final-form APIs #520
    • 🍱 πŸ’₯ Strongly typed form values for Flow and Typescript πŸ’₯ #516


    import { withTypes, Field } from 'react-final-form'type MyValues = { email: string, password: string}const { Form } = withTypes\<MyValues\>() \<Form onSubmit={onSubmit}\> {({ handleSubmit, values }) =\> { // values are of type MyValues }} \</Form\>

    Edit Strongly Typed Form Values with 🏁 React Final Form


    • βœ‚ Remove context export #515
    • βœ… Simplify slightly logic around keeping latest value in ref #513


  • v6.0.1 Changes

    May 29, 2019

    πŸ› Bug Fixes

    • No rerender on validateFields change #504 #502

    πŸ›  Type Fixes

    • πŸ›  Fix Flow typings for UseFieldConfig and FieldProps #503
    • βž• Added back flow types that got removed #505 #500
    • ⚑️ Update Types to make useField's options optional #499


  • v6.0.0 Changes

    May 27, 2019

    πŸš€ This release contains very minimal, edge-case, breaking changes.

    πŸ› Bug Fixes

    • πŸ›  Fixed bug in form component rerendering not responding to changes in form state properly. #498 #487 #492

    🍱 ⚠️ Breaking Changes ⚠️

    • Subscription changes will now be ignored. For some reason previous versions of React Final Form did extra work to allow you to change the 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 the key prop, which will force the component to be destroyed and remounted with the new subscription.
    • πŸ“œ parse={null} and format={null} are no longer allowed. That was a bad choice of API design, which is probably why Flow doesn't allow the Function | null union type. #400 Passing null served the purpose of disabling the default parse and format functionality. If you need to disable the existing parse and format, you can pass an identity function, v => v, to parse and format.
    < v6
    \<Field name="name" parse={null} format={null}/\>
    >= v6
    const identity = v =\> v...\<Field name="name" parse={identity} format={identity}/\>


  • v5.1.2 Changes

    May 24, 2019
    • Converted to use React.FC df89fde
    • βž• Added missing length value to FieldRenderProps 89454a4