Comment by WorldMaker

Comment by WorldMaker a day ago

2 replies

> I like React on the web, but only when using hooks and only because I haven't found anything that I like more than it.

After being thrown into the Angular woods for a while I found that what I really wanted was just a "React with RxJS Observables that look like writing Hooks if you squint, but don't have some of the complex rules either" and then I realized that I was basically trying to reinvent some of Knockout, but with TSX templates. I'm still amazed by how much I was able to accomplish from that idea, including some of the "advanced" features of modern React, in a relatively small package (modulo the one and only one dependency on RxJS).

I don't know how many other developers want the same thing.

(I know some find RxJS overly complex, which is exactly why Angular is as awful to work in as it is, both in how it badly uses RxJS (and teaches bad habits) and how there's generally three ways to do everything, one with RxJS and two others avoiding it or misusing it, with now a fourth way of Signals which are just RxJS-lite with Knockout-style `computed`, proving time is a flat circle and Angular remains a design-by-committee mishmash of too many things that don't interoperate well. I think learning Angular's mishmash is far worse than just learning RxJS well, but I also spent a lot of time doing Rx in C# and in CycleJS for a while, too.)

CharlieDigital a day ago

    >  and then I realized that I was basically trying to reinvent some of Knockout, but with TSX templates.
You may like Vue with TSX.

https://vuejs.org/guide/extras/render-function.html#jsx-tsx

React's reactivity model is "inverted" from almost every other model out there. Vue, to me, feels the most like Knockout. I also find that I rarely run into edge cases compared to React and Vue feels the most like OG HTML.

  • WorldMaker a day ago

    I did investigate Vue with TSX at one point. It wasn't for me, but I did like Vue with TSX over Vue's primary template language.

    A part of the way I see it is that Knockout promised "Observables" and `computed` was sort of the distracting fork away from something like RxJS Observables. Now that fork seems to be named "Signals". I'm not a fan of "Signals" and think they miss a lot of the power and elegance of "real" Observables like RxJS. I understand the appeal of the "magic" of `computed` tools. I better appreciate the power of the larger toolbox of RxJS operators. (I also think Observables are a lot easier to unit test than `computed`. A good "marble test" is a thing of beauty.)

    For what it is worth, my RxJS-based solution: https://github.com/WorldMaker/butterfloat