3 ms·
templates are still stringly-typed, aren't they? And that whole extra language just for templates is annoying, and unnecessary. I don't want a v-else-if="level
by emn13 5y ago
templates are still stringly-typed, aren't they?
And that whole extra language just for templates is annoying, and unnecessary. I don't want a v-else-if="level ==== 6", because I'm going to make typos, and I want the ability to refactor code in the future without painstakingly reviewing every string in the codebase.
How good is the jsx integration in practice? It's there, but the vue docs recommend against it, without going into details of the motivation.
- Already__Taken 5y agoI agree with the template sentiment but it's really hard to defend the webs of ternary operator nests I've seen in jsx Vs v-*
- emn13 5y agoYou're free to use if's instead, if you prefer; that's more similar to v-if's. I agree that ternaries aren't the prettiest of language idioms, but if clearly formatted (e.g. eslint defaults are fine), I think it's mostly a question of getting used to it. I mean, the tricky but also common && and || are almost certainly worse for this, I suppose?