3 ms·
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 s
by rikafurude21 1y 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.
- troupo 1y agoReact 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
- aquariusDue 1y agoThere's also Datastar that uses signals and ends up being the best of HTMX and Alpine.js combined (at a smaller bundle size too). https://data-star.dev/ https://data-star.dev/
- lbreakjai 1y agoReact 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.
- troupo 1y ago> 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.
- buibuibui 1y agoI 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!
- jazzypants 1y agoThis 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-why-you-shouldn-t-care-152m https://dev.to/this-is-learning/how-react-isn-t-reactive-and... [2] - https://dev.to/this-is-learning/the-evolution-of-signals-in-javascript-8ob https://dev.to/this-is-learning/the-evolution-of-signals-in-... [3] - https://www.solidjs.com/ https://www.solidjs.com/ [4] - https://github.com/adamhaile/S https://github.com/adamhaile/S
- WesolyKubeczek 1y ago> 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?
- troupo 1y agoActual 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
- jazzypants 1y agoYeah, 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.
- jauco 1y agoFwiw 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.
- jazzypants 1y agoOof! 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!
- yapyap 1y agolook into the Java observer pattern