Skip to content

useBoolean ​

utilities
test coverage
Last changed: 28 days ago

Hook provides opportunity to manage boolean state

typescript
import { useBoolean } from '@siberiacancode/reactuse';

Usage ​

typescript
const [on, toggle] = useBoolean()

Demo ​

Api ​

Parameters

NameTypeDefaultNote
initialValue?booleanfalseThe initial boolean value

Source ​

Source • Demo

Contributors ​

Avatardebabin
Avatarhywax

Released under the MIT License.