0.1.0 • Published 4 years ago

@hooks/boolean v0.1.0

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

🎒 @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.