react-native-toggle-button
Version:
Cool and easy to use react native toggle button
6 lines (5 loc) • 339 B
TypeScript
import { SetStateAction } from "react";
declare type Callback<T> = (value?: any) => void;
declare type DispatchWithCallback<T> = (value: any, callback?: Callback<any>) => void;
declare function useStateWithCallback<T>(initialState: any | (() => any)): [any, DispatchWithCallback<SetStateAction<any>>];
export default useStateWithCallback;