<p><pre><code> > The contortions one has to go through to use setInterval (or resort to a custom hook), the very manual management of dependencies with useEffect, useCallback and the like, the repetitive verbosity of useState – all of it eventually adds up to a tedious experience....
</code></pre>
Vue and Svelte are definitely better on this front.<p><pre><code> > but it somehow ends up being the uncanny valley of functional programming
</code></pre>
Evan You has a great quote regarding this: <i>"The pain and suffer of hooks all roots from the mismatch between a dogmatic belief in the superiority of immutability and the harsh reality of the host language that is JavaScript."</i><p>React, to extents, is fighting against the nature of JavaScript itself. The React team is on record acknowledging that signals are probably a more performant paradigm for updates, but preferring to "pretend" that components are stateless instead.<p><pre><code> > However, I was in for an unpleasant surprise as I started checking out how to set it up and quickly realised that as of 2024, the backend tooling just wasn’t mature enough...
</code></pre>
One generally does not run TS on the server. Dev in TS and compile and ship in JS as always because the runtimes are actually all JS; TS is purely a dev time sanity check and can be, as the Svelte team has done, interchanged with other approaches like JSDoc. Microsoft's type annotation proposal[0] would have been a nice "bridge", but was universally derided. The tooling is actually quite good considering the cluster that is NPM and node_modules. Vite and the wider ecosystem that it pulls together is pretty amazing.<p>[0] <a href="https://github.com/tc39/proposal-type-annotations">https://github.com/tc39/proposal-type-annotations</a>