FormHandle
The form as an inline layout entry receives it.
The form as an inline layout entry sees it: the members of TanStack's form whose types rest on the data type and the submit meta alone. It reads and writes values and field meta by path, subscribes to the form state, submits, resets and changes arrays.
Members whose types carry the form's validators, such as store, the error-map setters and the
validate methods, are left out; a form that needs them builds its own shell with
formHook.useAppForm. The validation errors in state are typed loosely for the same reason.
Type parameters
| Name | Description |
|---|---|
TData | The data type of the form. |
TSubmitMeta | What handleSubmit takes besides the values, as in TanStack's onSubmitMeta. |
Example
const layout: LayoutOf<typeof registry, Order> = [
'items',
{
render: (form) => (
<form.Subscribe selector={(state) => state.values.items.length}>
{(count) => <p>{count} items</p>}
</form.Subscribe>
),
},
]