@lesnoypudge/utils-react
Version:
lesnoypudge's utils-react
12 lines (11 loc) • 406 B
TypeScript
/**
* Manages a boolean state with functionality to modify its value and
* optionally trigger an external callback when the state changes.
*/
export declare const useBoolean: (initialState: boolean, providedOnChange?: (state: boolean) => void) => {
value: boolean;
setValue: import("..").useRefInjection.Fn<boolean>;
setTrue: () => void;
setFalse: () => void;
toggle: () => void;
};