React Hooks
    Preparing search index...

    Interface BooleanReturn

    Return type of useBoolean hook.

    interface BooleanReturn {
        value: boolean;
        setValue: Dispatch<SetStateAction<boolean>>;
        toggle: () => void;
        setTrue: () => void;
        setFalse: () => void;
        reset: () => void;
    }
    Index

    Properties

    value: boolean

    The current boolean value.

    setValue: Dispatch<SetStateAction<boolean>>

    Directly sets the boolean state.

    toggle: () => void

    Toggles the current value between true and false.

    setTrue: () => void

    Sets the value to true.

    setFalse: () => void

    Sets the value to false.

    reset: () => void

    Resets the value back to the initial defaultValue.