What I don't get in all these frameworks is the desire to invent new and incompatible template languages with increasingly inane syntaxes. Oh. And, of course, with stringly-typed programming and magic binding rules.
Just look at Svelte's templates: https://svelte.technology/guide#template-syntax
Not only it's some custom implementation, it also breaks all assumptions about javascript code
const counter = new Counter({
data: {
count: 99
}
});
...then {{count}}, or counter.get('count')
Why is it `counter.get('count')`? WTF?Or just the section on computed properties[1]: oh, it's no longer even Javascript. It's some magic Javascript-like scripting language that gets injected with properties based on what you write.
Much like in Vue data, properties, and methods are magically hoisted up to the object breaking everything you learned about Javascript:
export default {
methods: {
say: function ( message ) {
alert( message ); // again, please don't do this
}
}
};
// and then
import MyComponent from './MyComponent.html';
var component = new MyComponent({
target: document.querySelector( 'main' )
});
component.say( '' );
Why the hell is `.say` a top-level method now?And so on and so forth.