A user presses Space on “Email alerts.” The switch immediately turns on. The request fails, the UI silently flips back, and a screen-reader user receives no explanation. Optimistic UI made the happy path faster by making the failure path ambiguous.

The control needs four truths, not one Boolean:



type ToggleState = {
confirmed: boolean;
...