@kform/react
Version:
React integration for KForm.
14 lines (13 loc) • 640 B
TypeScript
import { type FormManager } from "@kform/core";
/**
* Hook providing access to the form manager within the context of a form. If a
* form manager is provided as argument, then the provided argument is returned
* instead.
*
* @param formManager Optional argument which, when provided, is simply returned
* as-is instead of the form manager within the context of a form.
* @returns The form manager within the context of a form or, when provided, the
* given form manager argument.
* @throws {NoFormManagerError} When no form manager was found.
*/
export declare function useFormManager(formManager?: FormManager): FormManager;