by gregoriol · 1y ago · 0 comments
Which is weird, because this is (was?) the predominant way to make websites for decades.
[Edit: this should've actually been attached to the GP comment. I agree with the parent.]
If you don't like the syntax, that's your preference. But I'm curious to hear why this is "wrong". Since that's a more objective thing, we can discuss it
You have a DSL based on data-* attributes
But then some attributes get this weird syntax-ish extension
Then some of those attributes accept a Datastar expressions DSL: https://data-star.dev/guide/datastar_expressions
So you can have
data-on-click__debounce.200ms="$landingGearRetracted && @post('/launch')"
Which is just bad designBut again, the API design woes are subjective and I think it's perfectly fine to iterate on getting this to a nicer state.
"Wrong" to me suggests a gap in the understanding of fundamentals or of how things work. If the ideas of Datastar are fine to all of us, and our issues with it are ergnomics, then that can be a more focused discussion.