0.1.0 • Published 6 years ago
@hooks/boolean v0.1.0
🎒 @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.