Post

tried writing this blog 3 times but it’s really boring, so here’s the short version: React won. Every mainstream f/w now implements its ideas, and developed their own ecosystems. The ones that didn’t, lost and died. This implies there’s no _strong_ reason to not pick one of the other winners.

I still genuinely don't know what "React adopt signals" would _mean_ at a technical level. Per other comments in this thread, React works at the component level. What would a hypothetical native-to-React signals integration do differently?

It would have to have been something new. Breaking likely. Signals would allow: - finer grained updates than “component” e.g. jsx fragments - state/data flow that isn’t tied to component hierarchy and doesn’t need to rerender (or subscribe to a store to rerender) itself and its children

0 reposts15 likes

Wasn’t the whole premise of react that re-run all the time cause it’s generally fast. Wouldn’t this break that mental model? Honestly I like the way react works, almost all the other frameworks have the same signal based reactive model. We need competing models.

It was fast compared to existing models back 8 years ago. But now it’s easy to get into trouble quickly. Fine grained reactivity is the next step, just like functional memoization was from digest cycles and dirty checking.

what changed that made it easy to get into trouble? Didn't fine grained reactivity existed before too? I remember knockout, heck even vue was released around similar time (which had reactive model like knockout). Iirc a team member had mentioned that they haven't ruled signals for optimization

Just progress, scale and fulfillment of what’s possible within a system. Knockout was on to something for sure and so is Vue. IMO, Solid is where I would have rather seen things go. It’s not too late either. I am betting on Solid long term.

Fine-grained reactivity *in the platform*, I'd say. Signals (by other names) have been around since long before React. They didn't have the juice on their own back then. We'll see if they do now.

Fair point. Old ideas, new paint. I think the latest stuff I'm seeing come out of Solid 2.0's new signals implementation is pretty far beyond impressive compared to any reactivity paradigms I've seen in a long while.

The reality of the business is that React is the 2 ton gorilla in the room. It's got jQuery levels of momentum, if not more. Nothing else is gonna make a dent without a solid, and relatively painless, migration story. Not for a long while at least.

either way we're gonna need a long while to get anywhere, because react can only evolve so fast :/ whatever is coming next is going to need strong buy in from a big company to invest heavily in and polish, and i don't see that happening right now. not to mention native being a massive boon for react

for change detection. - useMemo/useCallback would actually only get used for heavy computations instead of referential stability Just spitballing here. But look at Preact signals for more ideas.

The cynical reason why this never happened in React would be because it devalues React. If you don't need components to build complex trees of state, you barely need components at all. And then you barely need react at all. Working on React or a React FW subconsciously biases away from that.

You still need components for the domain modeling benefits. So signals let you re-render at the element level? That’s pretty neat. Guess you could do that by composing even smaller components but that probably gets unwieldy 🤔