Skip to content

useVexForm

useVexForm(): AnyFormApi

Defined in: packages/react/src/forms/useVexForm.ts:16

S5 context hook — exposes the current form instance to a slot contribution rendered inside a form (any field.*/blocks.*/array.* slot). Backed by @vexcms/react/form’s createFormHook form context — reads the raw context directly (not the throwing useFormContext()) so a slot rendered outside a mounted <AppForm> tree gets undefined instead of an error.

Experimental: breaking changes are still possible before this stabilizes.

AnyFormApi

The current form instance, or undefined outside an <AppForm>.