frmx
Version:
Simple, Performant, Lightweight React Forms
13 lines (12 loc) • 340 B
TypeScript
export default function useField(path: string, config?: {
native?: boolean;
trim?: boolean;
afterChange?(value: any, path: string, error: boolean): any;
disabled?: boolean;
}): {
value: any;
setValue: (next: any) => void;
error: boolean;
disabled: boolean | undefined;
onBlur: () => void;
} | undefined;