I wonder if any idea in frontend web development has been as ghastly terrible and resulting in the most awful UX losses of the past decade as:
UI = f(state)
🙄
I wonder if any idea in frontend web development has been as ghastly terrible and resulting in the most awful UX losses of the past decade as:
UI = f(state)
🙄
State and UI
@jaredwhite wonders "if any idea in frontend web development has been as ghastly terrible and resulting in the most awful UX losses of the past decade as:
UI = f(state)"
https://indieweb.social/@jaredwhite/115925161669511741
This sounds like a rhetorical question to me. Nevertheless I'll try to give some answers in this thread.
@jaredwhite
It is a leaky abstraction that inevitably gets people into trouble, because a usable web UI carries intrinsic state: route, focus, collapsed/expanded, cursor position, selection, scroll position, etc.
Those are also all the failure modes of “modern” web frontends, and that is not an accident.
@jaredwhite Is UI not a function of state? If not, what is it?
@jaredwhite I'm curious about alternative mental models.
For me it really clicked and matched how I thought about UIs intuitively. Many years later and I don't reach for React first anymore, but it's still how I approach UIs!
Is it because it falls apart at a certain size for you? Or is it because people take it farther than pragmatism?
@ryan it's probably fine as a sort of shorthand as you're working through problems in an abstract way, but it's just not at all how the web actually works.
It's important to remember what DOM stands for: Document Object Model. It is a deserialized object graph (HTML being the serialized format). The "state" lives within the objects and in the relationships between those objects.
Web UI is therefore targeted, judicial manipulation of individual object states plus object graph relationships.