@appbuckets/react-ui
Version:
Just Another React UI Framework
18 lines (17 loc) • 533 B
TypeScript
import * as React from 'react';
import type { RadioChangeHandler } from '../Radio';
export declare type UseRadioValueReturn<V> = [
V | undefined,
RadioChangeHandler,
React.Dispatch<React.SetStateAction<V | undefined>>
];
/**
* 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 useRadioValue<V extends string | number>(
initialValue?: V
): UseRadioValueReturn<V>;