<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y" -->

---
title: Why optimistic updates are corrosive | daily.dev
description: Showing an update as succeeded before the server confirms it is corrosive, because it normalizes software that is plainly broken and erodes user trust. If a...
canonical: https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why optimistic updates are corrosive | daily.dev
og:description: Showing an update as succeeded before the server confirms it is corrosive, because it normalizes software that is plainly broken and erodes user trust. If a...
og:url: https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y
og:image: https://api.daily.dev/og/posts/Ym7z9iS1Y.png
og:image:alt: Why optimistic updates are corrosive
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why optimistic updates are corrosive

**[Lobsters](https://daily.dev/sources/lobsters)** · 2 min read · 0 upvotes · 0 comments

## Summary

Showing an update as succeeded before the server confirms it is corrosive, because it normalizes software that is plainly broken and erodes user trust. If a switch flips, then reverts when the user returns, the software has failed. The 'instant intent' alternative shows only what is known to be true and skips the reconciliation machinery optimistic UI needs. In the demo, a pressed switch takes no more clicks and blinks after half a second without a reply. The client updates only when the server returns the reconciled HTML, which Datastar morphs in place.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://datastar-instant-intent.ndyg.cross.stream/corrosive>

## Questions this post answers

### Why are optimistic updates considered bad UX in web apps?

Optimistic updates show an action as succeeded before the server confirms it. If a user flips a switch, sees it flip, and later finds it unflipped, the software is broken and trust erodes. It also normalizes UI that misreports state, and requires reconciliation machinery to handle failures that were already shown as successes.

_Developers weighing UI state patterns follow these architecture debates on daily.dev._

### How does the instant intent pattern work for a toggle switch in Datastar?

On click, the switch shows as pressed immediately and the request is sent to the server. While pressed it accepts no further clicks, and if there's no answer within half a second it starts blinking. The client doesn't update further until the server returns the reconciled HTML view, which Datastar morphs in place.

_Building server-driven UIs with Datastar? daily.dev surfaces patterns like this as they emerge._

## Community take

How the wider developer community reacted, aggregated from 2 discussions and 8 comments across lobsters, hackernews (as of 2026-11-28).

**TL;DR:** Commenters largely buy the argument that pending states should be shown rather than faked, but several point out that designing a clear pending indicator isn't always trivial for simple UI elements like vote buttons.

**Sentiment:** 40% positive · 55% mixed · 5% skeptical

**The case for**

- The core argument is convincing that optimistic updates should be replaced by visible pending states when feasible.
- Several concrete UI patterns (hatched icons, disabled state, spinners, tooltips) are proposed as accessible ways to show in-flight actions.
- Some people say they'd personally benefit from a visible pending state on unreliable networks to know if their action actually registered.

**The pushback**

- Introducing a pending state isn't always straightforward without adding UI complexity, especially for simple elements like an upvote button.
- Color coding alone as a pending indicator is flagged as inaccessible to color-blind users.

**By community**

- lobsters (positive): Generally agrees with the thesis while debating practical ways to implement visible pending states, including on the site's own upvote button.
- hackernews (mixed): No comment content was provided to characterize the discussion.

**Hottest debate:** How to practically indicate a pending state for simple UI elements like an upvote button without adding too much complexity.

**Open questions**

- Who originally popularized the optimistic UI update pattern?
- What would an accessible, low-complexity pending-state design look like for simple actions like upvoting?

**Highlights**

> I often read lobsters on the subway where the network is unreliable, and I have often wished for an in-progress state so I would know whether my upvote actually went through! It’s very low stakes and lobsters is generally very responsive so I usually assume it did, but it’d be nice to know for sure. I don’t know exactly what such an in-progress state would look like, but I wish it existed.
> — [gavinmorrow on lobsters · 6 points](https://lobste.rs/s/amjski/why_optimistic_updates_are_corrosive#c_q0ky4n)

> Also not an UX guy but simplest solution that come to my mind would be one or more of the following: a color coding (yellow or filled gray instead of red) consistently used all over the website, subtle animation (replace arrow with small spinner?), changing state to disabled, tooltip. For me the benefit outweighs some ui complexity.
> — [TeddyDD on lobsters · 2 points, 1 comments](https://lobste.rs/s/amjski/why_optimistic_updates_are_corrosive#c_dcwis8)

> Color coding only is not great as it's not accessible to color blind people. That's why their examples have a dedicated icon for the in-progress state.
> — [ThinkChaos on lobsters · 1 points, 1 comments](https://lobste.rs/s/amjski/why_optimistic_updates_are_corrosive#c_rlhdwo)

**Source threads**

- [lobsters](https://lobste.rs/s/amjski/why_optimistic_updates_are_corrosive) · 20 points · 8 comments
- [hackernews](https://news.ycombinator.com/item?id=50671842) · 4 points · 0 comments

## Similar posts on daily.dev

- [Optimistic UI in Rails with optimism... and Inertia—Martian Chronicles, Evil Martians’ team blog](https://daily.dev/posts/optimistic-ui-in-rails-with-optimism-and-inertia-martian-chronicles-evil-martians-team-blog-jybdae5yb) · Martian Chronicles · 0 upvotes · 0 comments
- [How to Use the Optimistic UI Pattern with the useOptimistic\(\) Hook in React](https://daily.dev/posts/how-to-use-the-optimistic-ui-pattern-with-the-useoptimistic-hook-in-react-hjzugn8fy) · freeCodeCamp · 2 upvotes · 0 comments
- [React useOptimistic: Production Patterns for Instant UI Updates](https://daily.dev/posts/react-useoptimistic-production-patterns-for-instant-ui-updates-ok5mv0aiy) · SitePoint · 2 upvotes · 0 comments
- [Optimistic UI with wire:show](https://daily.dev/posts/optimistic-ui-with-wire-show-vpvlnsqjv) · Larablog · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#ux](https://daily.dev/tags/ux)

[View this post on daily.dev](https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why optimistic updates are corrosive","url":"https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y"},"datePublished":"2026-11-28T06:50:41.269Z","dateModified":"2026-11-28T06:51:10.397Z","description":"Showing an update as succeeded before the server confirms it is corrosive, because it normalizes software that is plainly broken and erodes user trust. If a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/68c4f0675be676306e87cd447af3bc67?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/68c4f0675be676306e87cd447af3bc67?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,ux","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Why optimistic updates are corrosive"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-optimistic-updates-are-corrosive-ym7z9is1y#faq","mainEntity":[{"@type":"Question","name":"Why are optimistic updates considered bad UX in web apps?","acceptedAnswer":{"@type":"Answer","text":"Optimistic updates show an action as succeeded before the server confirms it. If a user flips a switch, sees it flip, and later finds it unflipped, the software is broken and trust erodes. It also normalizes UI that misreports state, and requires reconciliation machinery to handle failures that were already shown as successes. Developers weighing UI state patterns follow these architecture debates on daily.dev."}},{"@type":"Question","name":"How does the instant intent pattern work for a toggle switch in Datastar?","acceptedAnswer":{"@type":"Answer","text":"On click, the switch shows as pressed immediately and the request is sent to the server. While pressed it accepts no further clicks, and if there's no answer within half a second it starts blinking. The client doesn't update further until the server returns the reconciled HTML view, which Datastar morphs in place. Building server-driven UIs with Datastar? daily.dev surfaces patterns like this as they emerge."}}]}
```

