I hate React. I fully understand why it was created and how it normalized data binding with HTML through the virtual DOM, but it (and Angular and Vue and so many others) are like building skyscrapers on a bed of sand.
const [count, setCount] = useState(0);
And that's after the import and wrapping in a function (sorry, "hook"). For a variable. A single variable. Every. Single. "Reactive" variable. To which there's also rxJS and its observables.
Can you build bigger things more cleanly than with vanilla JS? Arguably, yes. I came up when the web was new, before JQuery and Prototype. I remember the chaos. I'm not saying we should go back. Again, React and the others were created for very good reasons.
let count = 0;
That's what I want: to bind that to a tag and walk away. For that, you need a compiler. Not the JSX nonsense and TypeScript transpilation, a real compiler. Like Svelte. I honestly don't care if Svelte specifically "wins", but that model needs to prevail. Otherwise we'll just keep building on sand and wondering why the code turns to crap every two years as new folks are added to the team and old ones leave after the React team decides functions are better than classes after all.
const [count, setCount] = useState(0);
And that's after the import and wrapping in a function (sorry, "hook"). For a variable. A single variable. Every. Single. "Reactive" variable. To which there's also rxJS and its observables.
Can you build bigger things more cleanly than with vanilla JS? Arguably, yes. I came up when the web was new, before JQuery and Prototype. I remember the chaos. I'm not saying we should go back. Again, React and the others were created for very good reasons.
let count = 0;
That's what I want: to bind that to a tag and walk away. For that, you need a compiler. Not the JSX nonsense and TypeScript transpilation, a real compiler. Like Svelte. I honestly don't care if Svelte specifically "wins", but that model needs to prevail. Otherwise we'll just keep building on sand and wondering why the code turns to crap every two years as new folks are added to the team and old ones leave after the React team decides functions are better than classes after all.