interface / @typed/ui

Form.State

Serializable renderer-independent state of a form.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
State models
Since
1.0.0
Member of
Form

Import

import { Form } from "@typed/ui";

Access Form.State through the imported Form export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export interface State<Values extends object = object> {
    readonly values: Values;
    readonly defaultValues: Values;
    readonly errors: Partial<Record<keyof Values & string, string>>;
    readonly meta: Partial<Record<keyof Values & string, FieldMeta>>;
    readonly submitting: boolean;
}

Property: defaultValues

Exact baseline reference used by reset and retained independently from current values.

Property: errors

Current validation messages keyed by field name.

Property: meta

Dirty/touched metadata keyed by field name.

Property: submitting

Whether validation or the returned submit Effect is running.

Property: values

Current decoded field values.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source