2 ms·
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
by skrebbel 2y ago
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/ https://legendapp.com/open-source/state/v3/
- jzig 2y agoThey've turned React into Angular 19 with signals. Heh.
- skrebbel 2y agoI'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.
- jonstaab 2y agoThis 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.
- dhucerbin 2y agoReminds 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 https://github.com/calmm-js/karet