News for hackers. Stuff that matters.
Re:Svelte 5 is not JavaScript by skrebbel on Tuesday February 18, 2025 @01:36PM (#43093376)
Mostly offtopic, but I just want to drive-by namedrop Legend State, which provides a deep reactivity state system similar to the one in SolidJS or Svelte 5, but with substantially fewer gotchas because its design makes it abundantly clear when you're working with a proxy (which tracks dependencies) and when you're working with plain data.

The key trick is that its "observables" (similar to Solid Stores or Svelte runes) aren't mixed with the actual data, and instead are sort of pointers to the data. This makes it very clear when you're passing reactive observables around, and when you just have vanilla data. There's never confusion about whether a particular property access is properly tracked or not. There's never that feeling that it "is not JavaScript".

It works well with React but is fundamentally framework-independent. We moved to it after trying SolidJS (which Svelte 5 is strongly influenced by) and we haven't looked back. IMO it deserves a lot more mindshare than it currently has.

https://legendapp.com/open-source/state/v3/

Re:Svelte 5 is not JavaScript by jonstaab on Tuesday February 18, 2025 @03:41PM (#43094809)
This seems promising. I agree observables are probably the right way forward, although I haven't used them much beyond svelte stores. Observables via hooks might be a good way to eliminate the bad parts of hooks too.
Re:Svelte 5 is not JavaScript by jzig on Tuesday February 18, 2025 @01:43PM (#43093467)
They've turned React into Angular 19 with signals. Heh.
Re:Svelte 5 is not JavaScript by skrebbel on Wednesday February 19, 2025 @07:25AM (#43101309)
I'll admit I'm not deeply familiar with Angular signals, but simply signals are IMO not that useful beyond a conference demo. The real hard part is keeping fine-grained reactivity when you have large-ish amounts of hierarchical data. You'll need to somehow nest signals (like SolidJS and Svelte Runes do) or hierarchically mirror the data in a signal-like data structure (like Legend State observables). From a quick glance at the Angular docs, it doesn't seem like they've solved that at all.
Re:Svelte 5 is not JavaScript by dhucerbin on Tuesday February 18, 2025 @05:59PM (#43096221)
Reminds me of karet [0]. I used it with great success for making interactive visualizations. This duality of passing a value or passing a stream of values was great.

[0] https://github.com/calmm-js/karet