Early on 2026-11-28 (JST), two posts landed within about an hour of each other and started an argument. One was romshark's "Optimistic Update vs. Immediate Intent", posted to Hacker News (47 points, 46 comments) and Lobsters. The other was ndyg's "Why optimistic updates are corrosive", written by someone in the Datastar community, which reached 49 points and 22 comments on Lobsters. Both make the same blunt claim. In apps where the server is the source of truth, an optimistic update draws a result that hasn't been confirmed as if it had been, and that lies to the user. Their alternative is Immediate Intent: acknowledge the user's intent right away, and say honestly that the result is unconfirmed until it is.
The backdrop is that optimistic updates are now a built-in framework feature. React 19 ships useOptimistic, and TanStack Query's official guide walks you through rewriting the cache in onMutate and rolling back on error. Once something is that easy, "just make it optimistic" becomes the default, and these posts push back against that. The pushback drew plenty of counter-arguments: "losing a like is fine", "if 999 of 1000 calls succeed, making everyone wait is the worse UX", "if you draw the predicted result, it's optimistic even if you show a syncing badge". People don't even agree on what the terms mean, so it's worth deciding where you stand before you implement.
Any UI that changes state over a network has at least three states:
The question is how to handle state 2. Designs sort neatly along two axes:
| Does not mark unconfirmed | Marks unconfirmed | |
|---|---|---|
| Does not draw prediction | Naive pessimistic UI (you click, nothing happens, then a result appears) | Immediate intent (instant acknowledgement; the result appears only once confirmed) |
| Draws prediction | "Optimistic update" as romshark defines it (can lie) | "Optimistic UI with explicit state" (TanStack's opacity 0.5 example, Discord's greyed-out messages) |
romshark reserves the term "optimistic update" for the bottom-left cell and criticizes only that. Many replies on Lobsters and HN have the bottom-right cell in mind, so the two sides talk past each other: dutchCourage argues that showing a sync indicator is still optimistic, and the author answers that it isn't optimistic if you clearly say it's not persisted yet. For implementers the name doesn't matter much. Axis B does: is the difference between confirmed, pending and failed always visible to the user somewhere on screen? That is the real core of this debate.
romshark also calls out a common misconception: adding a queue doesn't automatically make an optimistic update honest. On the web, retrying after the tab is closed requires the Background Sync API, which MDN does not list as Baseline (it doesn't work in some major browsers). Stored data can also be evicted when space runs low or after a period of disuse. On the web, you can't assume a change will sync eventually.
Optimistic updates and immediate intent can share the same internal model: a confirmed value from the server, with a list of in-flight intents layered on top.
type IntentStatus = "pending" | "failed";
interface Intent<T> {
id: string; // doubles as the idempotency key; reused on retry
desired: T; // "what I want", as an absolute value, not a delta
status: IntentStatus;
sentAt: number;
error?: string;
}
interface Cell<T> {
confirmed: T; // value the server has confirmed
intents: Intent<T>[]; // unconfirmed intents
}
// Optimistic update: draw the latest intent as if it were confirmed
const optimisticView = <T,>(c: Cell<T>): T =>
c.intents.filter(i => i.status === "pending").at(-1)?.desired ?? c.confirmed;
// Immediate intent: draw the confirmed value as confirmed, overlay intents as a separate signal
const intentView = <T,>(c: Cell<T>) => ({
value: c.confirmed,
pending: c.intents.find(i => i.status === "pending")?.desired,
failed: c.intents.find(i => i.status === "failed"),
});
Only the view function differs. The data shape and the network calls are the same. That answers the objection that immediate intent is heavier to build. If anything, the optimistic version is heavier: because it treats a prediction as confirmed, it has to undo something that looked confirmed when the request fails. ndyg writes that software that doesn't lie is easier to build, because you can skip all the reconciliation machinery needed to tell users that a change they thought went through didn't. ryan_beethe counters that if you reuse the server's request-handling logic on the client, optimistic updates come cheap, and immediate intent is the extra code path. Both sides agree on one thing: you need rollback either way, and it should be guaranteed by structure, not hand-written for each request.