News for hackers. Stuff that matters.
Re:AI Is Stifling Tech Adoption by CharlieDigital on Friday February 14, 2025 @11:54AM (#43050365)

    > ...a different underlying model is an extraordinary claim that requires extraordinary evidence
You are looking at the syntax and not the reactivity model (how it determines what functions to call when a change happens).

The post doesn't need to mention Preact because every other framework is signals-based except for React. Vue is simply the stand-in for "signals-based reactivity". Vue has different syntax from Preact (though it, too, can also use JSX), but it has the same reactivity principle.

https://preactjs.com/guide/v10/signals/

    > What makes Signals unique is that state changes automatically update components and UI in the most efficient way possible. Automatic state binding and dependency tracking allows Signals to provide excellent ergonomics and productivity while eliminating the most common state management footguns.
It uses the same underlying reactivity model as Vue, Svelte, Solid, and Qwik.

Vue docs: https://vuejs.org/guide/extras/reactivity-in-depth.html#conn...

Solid docs: https://www.solidjs.com/docs/latest/api#createsignal

Svelte: https://svelte.dev/blog/runes#Signal-boost

Qwik docs: https://qwik.dev/docs/components/state/#usesignal

In the blog post, Vue is the stand-in for signals-based reactivity. All signals-based reactivity models work the same way at a high level (their difference being primarily in their low-level DOM diff and update).

My prediction is that even React will eventually end up signals based because of TC39 Signals: https://github.com/tc39/proposal-signals

Re:AI Is Stifling Tech Adoption by sesm on Friday February 14, 2025 @12:17PM (#43050586)
Preact is not signals-based, it uses the React model with state and props as the basic model, but also provides Signals as a parallel model.
Re:AI Is Stifling Tech Adoption by CharlieDigital on Friday February 14, 2025 @12:26PM (#43050680)
I guess that's like arguing a Prius Prime isn't electric because even though it has a battery and can drive all electric, it also has a gas engine. :shrug:

But very clearly, Preact has the option of the exact same reactivity primitive and design as Vue, Solid, Qwik, and Svelte

https://preactjs.com/guide/v10/signals/

    > In Preact, when a signal is passed down through a tree as props or context, we're only passing around references to the signal. The signal can be updated without re-rendering any components, since components see the signal and not its value. This lets us skip all of the expensive rendering work and jump immediately to any components in the tree that actually access the signal's .value property.
Re:AI Is Stifling Tech Adoption by sesm on Friday February 14, 2025 @01:03PM (#43051150)
I'll accept an analogy with a hybrid car. In this analogy, Preact would be a gas car with an additional electric engine bolted on as an afterthought.
Re:AI Is Stifling Tech Adoption by CharlieDigital on Friday February 14, 2025 @01:40PM (#43051578)
But you know, the Prius Prime is a PHEV as in "plug in hybrid electric vehicle"
Re:AI Is Stifling Tech Adoption by sesm on Friday February 14, 2025 @02:09PM (#43051888)
Oh, I see what you mean now! This sounds like a very good analogy.