UNPKG

@rozhkov/react-useful-hooks

Version:
12 lines 406 B
import { Dispatch, SetStateAction } from 'react'; type Ref<T> = { readonly current: T; }; declare function useStateRef<S = undefined>(): [ S | undefined, Dispatch<SetStateAction<S | undefined>>, Ref<S | undefined> ]; declare function useStateRef<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>, Ref<S>]; export default useStateRef; //# sourceMappingURL=useStateRef.d.ts.map