Declarative Dragging

birdculture 11 points 1 comment November 05, 2026
declarative-dragging.github.io · View on Hacker News

Discussion Highlights (1 comments)

corbins

The demos[0] and the inspectability of them are both really amazing! I'm reminded of Deprecating the Observer Pattern[1], which looks at an FRP approach to drag-n-drop - it's a good read and shows that we've never had a solid idiomatic approach to such an elemental interaction. I have a growing hunch that state machines, possibly extended for greater composition as in statecharts[2], are the best way to represent many UIs. They're declarative and represent change as a first-class thing: an `arrow`. Functions and methods don't map well to this concept and I think that's why it's a bitch to specify state machines in code. Maybe we gave up too early with `goto` [0] https://declarative-dragging.github.io/dragology/#/demos [1] https://news.ycombinator.com/item?id=17845341 [2] https://news.ycombinator.com/item?id=25454175

Semantic search powered by Rivestack pgvector
3,874 stories · 35,194 chunks indexed