> 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....
Vue and Svelte are definitely better on this front.
> but it somehow ends up being the uncanny valley of functional programming
Evan You has a great quote regarding this: "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."
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.
> 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...
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.
> 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
Which is also why both Deno and Bun took the approach of type stripping/type ignoring but not type checking. When you want type checking, run the Typescript compiler, whether that is in your IDE or your CI or whatever else. When you want to run the code, just strip the types.
> Microsoft's type annotation proposal[0] would have been a nice "bridge", but was universally derided.
I don't think "Stage 1" is "universally derided", it would have never made it out of "Stage 0" if that were the case. It has been on a very slow track, sure, to "Stage 2" and there have been some controversies/pushback, but that doesn't mean everyone is against the proposal or that the proposal may never make it to "Stage 2" (just that it may change a bunch before it does, or it may have to make political concessions).
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.
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.[0] https://github.com/tc39/proposal-type-annotations
> 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
Which is also why both Deno and Bun took the approach of type stripping/type ignoring but not type checking. When you want type checking, run the Typescript compiler, whether that is in your IDE or your CI or whatever else. When you want to run the code, just strip the types.
> Microsoft's type annotation proposal[0] would have been a nice "bridge", but was universally derided.
I don't think "Stage 1" is "universally derided", it would have never made it out of "Stage 0" if that were the case. It has been on a very slow track, sure, to "Stage 2" and there have been some controversies/pushback, but that doesn't mean everyone is against the proposal or that the proposal may never make it to "Stage 2" (just that it may change a bunch before it does, or it may have to make political concessions).