Many components need a simple on/off state: modal open/closed, toggle on/off, collapsible expanded/collapsed. Writing the same get/set/toggle logic repeatedly is errorโprone.
Centralized boolean state with get(),
set(value), toggle(), and a
subscribe(callback) method that notifies all listeners when the state changes.
Toggle, Switch, Collapsible, Dialog, AccordionItem, Popover, Tooltip