UNPKG

@react-form-fields/core

Version:

Material UI Form Fields

10 lines (9 loc) 403 B
/// <reference types="react" /> declare type IModel<T> = { [key in keyof T]?: T[key]; } & { $dirty?: boolean; toJSON?(this: IModel<T>): T; }; declare const useModel: <T>(initialState?: Partial<T>) => [IModel<T>, (key: string, handler: (model: Partial<T>, value: any) => void) => any, import("react").Dispatch<import("react").SetStateAction<IModel<T>>>, () => void]; export default useModel;