Comment by rikafurude21

2 days ago

I've been writing front-end javascript the "just use functions" way and never really wanted to get into React because it looks too complicated. But this makes sense. God damn it I want to actually learn react now.

This article never mentions React. This has nothing to do with React. There's a reason people say "react is not reactive"[1].

Signals are derived from Observables[2] which were first used in Adam Haile's S.JS[2] and made popular in JavaScriptLand by Ryan Carniato's SolidJS[3].

[1] - https://dev.to/this-is-learning/how-react-isn-t-reactive-and...

[2] - https://dev.to/this-is-learning/the-evolution-of-signals-in-...

[3] - https://www.solidjs.com/

[4] - https://github.com/adamhaile/S

  • Fwiw knockoutjs seems to predate s.js (2010 vs 2013)

    I can’t remember if at that point it was the first lib to uses observables.

    • Oof! I can actually still see a link to Knockout.js in my clipboard, so I clearly meant to add it as a source for that post. I also got the numbering all wrong, so I guess I should have spent another minute checking it for accuracy.

      Thanks for the correction so that other people can learn!

  • Since GP mentioned React, I think MobX was more popular there and seems to predate SolidJS. Also, Valtio is a modern version of the same idea but with a lot less boilerplate.

  • > made popular in JavaScriptLand by Ryan Carniato's SolidJS[3]

    Are you sure it hadn't been, by chance, made popular even before by KnockoutJS?

    • Yeah, as I said in response to another commenter, I actually had a link to Knockout in my clipboard. I'm pretty sure I was supposed to add the link after the word Observable.

    • Actual popularity to the point that they are now being adopted into the standard (not to say all frameworks except React) came thanks to Ryan. Though he explicitly acknowledges that original ideas come from Knockout, S and Marko

React is very far from signals (and very far from sane state management). Better alternatives:

- SolidJS (kickstarted the whole signals revolution)

- Svelte

- Preact (and Preact Signals)

- Well, even Angular got signals now

  • I actually created the library after being exposed to Angular Signals starting from the v16 release. I watched some talks and read articles about Signals, just to know about Ryan Carniato from SolidJS. He did an excellent job teaching the world about Signals!

  • React doesn't really make many assumptions regarding state management. You're free to pick the library you want. Redux used to be the standard, but I worked on applications purely using RxJS, the way signals are presented in this article.

    • > You're free to pick the library you want.

      They are all still pretty hampered by React's model: re-render (internally, in VDOM) the whole component on any minor change.