@mantine/hooks
Version:
A collection of 50+ hooks for state and UI management
7 lines (6 loc) • 409 B
TypeScript
export declare function getInputOnChange<T>(setValue: (value: null | undefined | T | ((current: T) => T)) => void): (val: null | undefined | T | React.ChangeEvent<any> | ((current: T) => T)) => void;
export type UseInputStateReturnValue<T> = [
T,
(value: null | undefined | T | React.ChangeEvent<any>) => void
];
export declare function useInputState<T>(initialState: T): UseInputStateReturnValue<T>;