Skip to content

. Add use-boolean.ts hook #291

Description

@DeFiVC

What: Create a reusable useBoolean hook for toggle states (open/close, active/inactive).

Why: Multiple components need boolean toggle state. A reusable hook reduces useState boilerplate.

Scope: Create src/lib/hooks/use-boolean.ts that returns [value, setTrue, setFalse, toggle]. Use useState and useCallback.

Acceptance criteria:

  • Hook returns boolean and toggle functions
  • Functions are memoized
  • Works with initial value
  • Clean API

Technical context: src/lib/hooks/ — hook patterns. src/components/shared/confirm-dialog.tsx — dialog state.


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions