interface / @typed/ui/index

Form.InitialState

Input used to construct a hydrated form state.

Learn this UI primitive →

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

Import

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

Access Form.InitialState 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 InitialState<Values extends object> {
    readonly id?: string;
    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 reset-baseline reference; defaults to the same object as values.

Property: errors

Optional initial validation messages.

Property: id

Stable relationship/hydration id; provide it for deterministic SSR.

Property: meta

Optional initial field metadata.

Property: submitting

Whether validation or the returned submit Effect is running.

Property: values

Initial decoded values.

Other public imports

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

Source