- The
Formcomponent is now a render-prop component which supports the "big three" render-prop formats (componentandrender/childrenfunctions). - The
FormFieldcomponent has been renamed toFieldand is now a render-prop component which supports the "big three" render-prop formats (componentandrender/childrenfunctions). withFormFieldis a new dedicated HOC function, which mirrors the capabilities ofFieldbut with the HOC syntax.- Added a new
FormApirender-prop component and companionwithFormApiHOC which allow you to access the nearest formApi ancestor from anywhere in your component tree. - Added
pureprop toForm,FieldandwithFieldcomponents. While using thepureprop, theFieldinstance will only rerender when form state or shallow prop values change. Use this to increase performance on large forms. By default this prop is true. Set it to false to deactivate the Optimization (rare cases). NestedField/withNestedFieldis a new component that is replacing and deprecating theNestedFormcomponents.NestedFieldallows you to set a new field context for any childFieldandFormApicomponents. This allows for extremely implicit field declarations within components without having to worry about form composition.
Fieldis now a render-prop component, not an HOC. You can either directly replace it with thewithFormFieldHOC, or adopt the inline FAAC format.Form's 'dontValidateOnMountis nowvalidatedOnMountand defaults to false. If you want to validate on mount, use thevalidateOnMountprop.- Polyfills for
Array.find,Array.findIndexandArray.includesare no longer provided with the library. If your target browsers do not support these methods, please manually include a polyfill for these methods in your app. - The
fieldApiprop continues to be available, but only when using HOC or FAAC-component-prop syntaxes. When using the FAAC render prop or child-as-a-function syntax's, thefieldApiobject is directly spread into the render and child-as-a-function's main prop parameter. - All value getters located on the
fieldApiare now static values eg. (getValue()is nowvalue,setTouched()is nowtouched, and so on withgetError,getSuccessandgetWarning)! NestedFormhas been deprecated in favor of theNestedFieldcomponent and field-level default values and validations.- The
Formcomponents'formDidUpdateprop has been deprecated in favor of theonChangeprop. - Styled forms are no longer bundled with ReactForm. We will be developing a serrate
npmmodule for this.