function useSoundsEnabled
useSoundsEnabled(): [boolean, (enabled: boolean) => void]

Returns whether sounds are on in this browser, and a setter that stores the choice. playChime reads the stored value each time it plays, so the choice applies at once without this hook, and another mounted copy of it isn't updated.

Return Type

[boolean, (enabled: boolean) => void]

Usage

import { useSoundsEnabled } from "src/hooks/shared/useSoundsEnabled.ts";