UNPKG

@appbuckets/react-ui

Version:
18 lines (17 loc) 498 B
import * as React from 'react'; import type { InputChangeHandler } from '../Input'; export declare type UseInputValueReturn = [ string, InputChangeHandler, React.Dispatch<React.SetStateAction<string>> ]; /** * Use this hook to get automatically the input value * and the handler function to attach to input. * Additionally function to force change will be returned * * @param initialValue */ export declare function useInputValue( initialValue?: string | null ): UseInputValueReturn;