News for hackers. Stuff that matters.
Re:Htmx Is the Future by dfabulich on Friday May 05, 2023 @02:59PM (#35833723)
The fix is to save data to client-side storage (IndexedDB) before attempting a network connection, and retries when connectivity is restored.

Optimistic UI probably isn't necessary for a web site, but you'll certainly want it for a web app (which is what Htmx claims to be good for).

In the real world on the mobile web we actually have, TODO apps (which is what TFA is about), calendars, notes apps, etc. all work better with client-side state synchronized to the server in the background.

React has a bunch of good libraries for this, especially TanStack React Query.

Htmx doesn't.

Re:Htmx Is the Future by listenallyall on Friday May 05, 2023 @07:04PM (#35836176)
So actually React does not address your precious Optimistic UI, you as a developer rely on an separate 3rd party library to handle it. We all know that React, a decade old by now, has a wider ecosystem. If that's your argument, then I guess every developer using emerging or niche languages, libraries and frameworks is wrong in your eyes. However, you're a guy who relies on "State of JS" to decide what to use, as opposed to thinking for yourself.
Re:Htmx Is the Future by dbmikus on Saturday May 06, 2023 @03:13AM (#35838963)
No need to make such personal attacks in a comment here.