Core concepts
Lifecycle & submission
How a form mounts, validates, and submits — and where plugins hook in.
Mount
<Form>creates (or receives) aFormStore.- Each
<Field>registers its descriptor (key, validators, options) with the store in auseEffect. <Form>attaches the dependency engine and plugins in its ownuseEffect, which runs after all field effects — so the engine sees every field on its first pass and computes initial conditional state.
Change
When a value changes:
- The store updates that field and wakes its subscribers (and the form-state subscriber).
- Validation runs according to the validation mode.
- The dependency engine reacts:
propsDependsOnrules whose sources changed recompute and merge into the target's runtime props;valueDependsOnderivations are queued on a microtask;resetDependsOnchecks its rising edge. - Plugin
onChangehooks fire.
Submission
<EasyForm
schema={schema}
onSubmit={async (values) => {
// values: only visible, non-hidden fields
await save(values);
}}
/>On submit, the store validates all (visible) fields. If everything passes, onSubmit
receives the values and isSubmitting is true while your promise resolves. Hidden fields
(via field or group visibility) are excluded from the payload and skipped during
validation.
The default footer disables submit until the form is dirty and valid and re-disables it while submitting.
Plugins
Plugins observe and react to the lifecycle:
interface FormPlugin {
onInit?(ctx): void;
onChange?(ctx): void;
onSubmit?(ctx): void;
onDestroy?(ctx): void;
}Built-ins: loggerPlugin (logs lifecycle events) and autosavePlugin (debounced
persistence). See the Plugins API.