- The
Form
component is now a render-prop component which supports the "big three" render-prop formats (component
andrender
/children
functions). - The
FormField
component has been renamed toField
and is now a render-prop component which supports the "big three" render-prop formats (component
andrender
/children
functions). withFormField
is a new dedicated HOC function, which mirrors the capabilities ofField
but with the HOC syntax.- Added a new
FormApi
render-prop component and companionwithFormApi
HOC which allow you to access the nearest formApi ancestor from anywhere in your component tree. - Added
pure
prop toForm
,Field
andwithField
components. While using thepure
prop, theField
instance 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
/withNestedField
is a new component that is replacing and deprecating theNestedForm
components.NestedField
allows you to set a new field context for any childField
andFormApi
components. This allows for extremely implicit field declarations within components without having to worry about form composition.
Field
is now a render-prop component, not an HOC. You can either directly replace it with thewithFormField
HOC, or adopt the inline FAAC format.Form
's 'dontValidateOnMount
is nowvalidatedOnMount
and defaults to false. If you want to validate on mount, use thevalidateOnMount
prop.- Polyfills for
Array.find
,Array.findIndex
andArray.includes
are 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
fieldApi
prop 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, thefieldApi
object is directly spread into the render and child-as-a-function's main prop parameter. - All value getters located on the
fieldApi
are now static values eg. (getValue()
is nowvalue
,setTouched()
is nowtouched
, and so on withgetError
,getSuccess
andgetWarning
)! NestedForm
has been deprecated in favor of theNestedField
component and field-level default values and validations.- The
Form
components'formDidUpdate
prop has been deprecated in favor of theonChange
prop. - Styled forms are no longer bundled with ReactForm. We will be developing a serrate
npm
module for this.