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