falcondev-form
@falcondev-oss/form
A framework-agnostic form-state library on top of @vue/reactivity. You give it a Standard Schema (zod v4, arktype, …) and reactive sourceValues; it gives you a reactive form handle with a tree of field accessors.
Three published packages — pick the one for the runtime, never import -core directly in app code:
| Package | Entry | Adds |
|---|---|---|
@falcondev-oss/form-core |
useFormCore, all types, /reactive helpers |
engine; use directly only outside React/Vue |
@falcondev-oss/form-react |
useForm, useField, FormFieldMemo |
React re-render integration, field.model = {value,onUpdate} |
@falcondev-oss/form-vue |
useForm, useFormHandles |
field.model writable computed (v-model) |
useForm from the framework package wraps useFormCore — same options, same handle. Everything below is identical across frameworks except field binding and re-render (see reference/frameworks.md).
Two ideas that explain everything
-
Accessors are lazy paths;
$use()materializes.form.fields.address.cityis just a typed path proxy — no field object exists yet. Calling.$use()creates (and caches) the actual reactiveFormField. Navigate with dot/.at(), then.$use()at the leaf you bind. -
Form data is
NullableDeep. While editing, every value can benull— a half-filled form has nulls everywhere. Soform.data,field.value, and accessor types are the schema's input type made deeply nullable (objects →T | null, arrays →(T|null)[] | null). The validated output type (non-null) only appears insubmit({ values }). Write UI against nullable types; trustsubmitfor clean data.