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
Name | Type | Default | Note |
---|---|---|---|
initialValue? | boolean | false | The initial boolean value |