UNPKG

279 BTypeScriptView Raw
1/**
2 * Returns a stateful value, and a set of memoized functions to toggle it,
3 * set it to true and set it to false
4 */
5export declare function useToggle(initialState: boolean): {
6 value: boolean;
7 toggle: () => void;
8 setTrue: () => void;
9 setFalse: () => void;
10};