DOM attributes are built for browsers and frameworks to take advantage of.
The style of some of those frameworks to stick symbols in there is weird. But that only goes against those frameworks. It doesn’t impact how good DOM attributes actually are.
kameecoding@lemmy.world 11 months ago
nah mate,mixing html into js is fucked, no matter how hard you cope.
realharo@lemm.ee 11 months ago
Still better than whatever the hell this is
vuejs.org/guide/essentials/template-syntax
The more you scroll down, the worse it gets.
And this too: vuejs.org/guide/essentials/list
kameecoding@lemmy.world 11 months ago
template syntax is a piece of cake, takes literally 2 hours to learn everything you need and you can easily see what’s where and how the html will look when it’s rendered or not.
realharo@lemm.ee 11 months ago
But why bother with creating a new language, and duplicating all the features your language already has, in a weird way?
If I want a list of items based on an array, I can just do
items.map(item => )
, using the normalmap
function that’s already part of the language.Or I can use a function, e.g.
items.map(item => renderItem(item, otherData))
etc.