Skip to main content
Version: Next

useCheckboxes()

function useCheckboxes(defaultState): object

Hook to maintain checkbox state

Parameters

ParameterType
defaultStateCheckbox[]

Returns

object

checkboxes

checkboxes: Checkbox[];

setCheckbox()

setCheckbox: (index, checked) => void;

Parameters

ParameterType
indexany
checkedany

Returns

void