Skip to main content

Function: createCheckboxChangeHandler()

createCheckboxChangeHandler(setValue: (value: boolean) => void): (event: ChangeEvent<HTMLInputElement>) => void

Defined in: src/components/shared/formUtils.ts:159

Creates a standardized handler for checkbox changes

Parametersโ€‹

setValueโ€‹

(value: boolean) => void

State setter function

Returnsโ€‹

Checkbox change handler

(event: ChangeEvent<HTMLInputElement>) => void

Exampleโ€‹

const handleNotificationsChange = createCheckboxChangeHandler(setNotifications);