A non-visual component to get form state when rendering JSX
useForm()
.<WithState />
allows you to access the form values via render props
in the JSX, so you can conditionally render fields.
<WithState />
allows you to know whether or not the form is currently being
submitted, so you can change the UI, e.g. disabling a secondary button.
false
.If true
, the errors
will be passed to the children
render prop.false
.If true
, the submitting
will be passed to the children
render prop.false
.If true
, the values
will be passed to the children
render prop.errors? : Object
submitting? : boolean
true
until the Promise
resolves from onSubmit
, false
otherwise.values? : Object