Skip to content

useSubForm ​

Overview ​

Creates a child form context that delegates submission and loading state to a parent form context, scoped to an optional path prefix.

Signature ​

useSubForm(options)

Parameters ​

NameTypeRequiredDescription
optionsobjectyesOptions for the subform.

options Properties ​

NameTypeRequiredDefaultDescription
parentPathstring | RefThe path to the parent form.

Returns ​

FormContext

  • The sub form context for the subform.

Source ​

client/lib/use/useSubForm.js:18