Skip to main content
Version: 0.1.2

Interface: FormHandle()

Imported from @react-logic/utils

Callable form-state signal. Read with (), mutate via setValue / setError / reset. The useForm hook reads the underlying tree for its bind/error proxies.

Type Parameters​

S​

S extends Schema

The schema.

FormHandle(): FormSnapshot<S>

Callable form-state signal. Read with (), mutate via setValue / setError / reset. The useForm hook reads the underlying tree for its bind/error proxies.

Returns​

FormSnapshot<S>

Properties​

[REACTIVE_ACCESSOR_MARKER]​

[REACTIVE_ACCESSOR_MARKER]: true

Methods​

reset()​

reset(): void

Returns​

void


setError()​

setError(path, error): void

Parameters​

path​

string

error​

string | null

Returns​

void


setValue()​

setValue(path, value): void

Parameters​

path​

string

value​

unknown

Returns​

void