by selfmodruntime · 5y ago · 0 comments
Svelte instead opts for compile-time magicks to handle state.
Angular uses decorators to manage state. This has turned out to be an unwise descision because javascript decorators have changed in spec since then.
export class AppComponent { }
export const appComponent = Component(AppComponent, {
template: '<h1>Hello World!>/h1>
// other compile-time instructions
});
How you want to approach runtime state has nothing to do with decorators.And like I said, react promised immutable state would solve a lot of problems, but it turns out you lose a lot of convenience as a developer while not gaining that much.