3 ms·
JSX is not JavaScript, so if you're using it, you're wholly in the "new syntax" camp.
by Tade0 4y ago
JSX is not JavaScript, so if you're using it, you're wholly in the "new syntax" camp.
- veidelis 4y agoSure, 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.
- Tajnymag 4y agoYou can write render functions manually in vue too.