mobx-easy-form
Version:
Simple and performant form library built with MobX
22 lines (21 loc) • 723 B
TypeScript
import { CreateFormArgs } from "./createForm";
export declare function useForm(args: CreateFormArgs, deps?: any[]): {
fields: Record<string, import("./createField").Field<any, any>>;
state: {
isSubmitting: boolean;
valuesAtLastSubmit: string | undefined;
submitCount: number;
};
computed: {
readonly isDirty: boolean;
readonly errorList: (string | undefined)[];
readonly isError: boolean;
readonly isValid: boolean;
readonly valueList: string;
readonly isChangedSinceLastSubmit: boolean;
};
actions: {
add(field: import("./createField").Field<any, any>): void;
submit: () => any;
};
};