@hooks/boolean
v0.1.0
Published
React hook to store a boolean
Downloads
12
Maintainers
Readme
🎒 @hooks/boolean
React hook to store a boolean
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.