Function: formState()
Imported from
@react-logic/utilsformState<
S>(schema):FormHandle<S>
Defined in: utils/src/lib/forms.ts:497
Build a reactive form. Returns a callable signal — form() produces an
atomic FormSnapshot (values, errors, touched, dirty, plus aggregate
valid / pristine / submitting / submitted).
Schema is recursive — use formGroup for nested objects.
Empty {} is a text field with '' initial. kind: 'checkbox' defaults
to false. Built-in validator factories live next to this module.
Type Parameters
S
S extends Schema
The schema. Use the const modifier so validator-name
literals propagate to errors typing.
Parameters
schema
S
Returns
FormHandle<S>