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