Re:Migrating from Vue 2 to Svelte
by Tade0 on Friday December 02, 2022 @08:48AM
(#33830352)
JSX is not JavaScript, so if you're using it, you're wholly in the "new syntax" camp.
[ Parent
| on HN ]
Sure, you're right about that. It's just that everybody, for example, has the option to use React.createElement directly without JSX, as it's just a syntax sugar and people use it because they prefer it over the other option. Let's consider Vue's syntax:
<template v-for="todo in todos">
<li v-if="!todo.isComplete">
{{ todo.name }}
</li>
</template>
Genuinely, do developers have the option to "just use JS" here (for looping and conditional)? I personally think this Vue example is very inferior to JS and I see it as an unnecessary complexity unless this "weird string magic" is what enables some nice-to-have feature which is not possible with plain JS.