@react-rx/form
Version:
rx form for react, use typescript for development
20 lines (19 loc) • 855 B
TypeScript
/// <reference types="react" />
import { Dictionary } from "lodash";
import { IFieldAction, IFieldInnerProps, IFieldMeta, IFormAction, IFormState } from "./interfaces";
export declare const log: ({ action, prevState, nextState, }: {
action: IFieldAction | IFormAction;
prevState: IFormState;
nextState: IFormState;
}) => void;
export declare const dropEmpty: <T = Dictionary<any>>(values: T) => Dictionary<any>;
export declare const isEmptyValue: (value: any) => boolean;
export declare const pickInputPropsFromFieldProps: <T extends {
meta: IFieldMeta;
} = IFieldInnerProps>({ meta, ...others }: T) => Omit<T, "meta"> & {
error: string | undefined;
};
export declare const pickDOMAttrs: (props: Dictionary<any>) => {
[key: string]: any;
};
export declare const useValueRef: (value: any) => import("react").MutableRefObject<null>;