@hooks/boolean
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

🎒 @hooks/boolean

React hook to store a boolean

NPM version Travis License

Install

npm i @hooks/boolean

Usage

useBoolean

useBoolean(initialValue: boolean): [boolean, (nextValue?: boolean) => void]

Parameters

initialValue: boolean

The initial state for the value.

Return

Returns an array containing the value and a function to update it.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @hooks/boolean

    Weekly Downloads

    4

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    5.49 kB

    Total Files

    10

    Last publish

    Collaborators

    • simmo