use-checkbox
v1.1.1
Published
# How use?
Readme
Hooks for checkbox
How use?
The checkboxes options is based in an array of objects, and at each object the key and checked propriety is required.
See the example.
const options = [
{
key: 'bacon',
label: 'Bacon',
checked: true
},
{
key: 'apple',
label: 'Apple',
checked: false
}
]
const {checkboxes, setChecked} = useCheckbox(options)