SSE Hooks

useBoolean

Custom hook that handles boolean state with useful utility functions.

Installation

npx sse-tool add use-boolean

Usage

import { useBoolean } from "./{hooks file}";

const { value, setTrue, setFalse, toggle } = useBoolean(true);

API

Parameters

NameTypeDescription
defaultValuebooleanThe initial value for the boolean state (default is false).

Return Value

Returns UseBooleanReturn.

An object containing the boolean state value and utility functions to manipulate the state.

Changelog

c165d — feat: enhance useRoleGuard and useSSR hooks with additional options and documentation

30da4 — feat: add new hooks and their metadata

cf13e — feat: add custom hooks for step navigation, ternary dark mode, timeout, toggle, unmount, and window size

Built with Love • © 2026