@appbuckets/react-ui
Version:
Just Another React UI Framework
18 lines (17 loc) • 498 B
TypeScript
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;