News for hackers. Stuff that matters.
Re:A proposal to add signals to JavaScript by nullvoxpopuli on Sunday March 31, 2024 @03:51PM (#39887465)
> it should handle deep changes.

these can be implemented in userland via proxy -- and I think probably should, as is proven by this collection of utils: https://twitter.com/nullvoxpopuli/status/1772669749991739788

If we were to try implementing everything as reactive versions, there'd be be no end, and implementations couldn't keep up -- by pushing reactive Map/Set/etc to userland/library land, we can implement what we need when we need it incrementally, built on the solid foundation of the signal primitives.

> since non-deep is an optimization that can lead to accidental inconsistent state.

conversely, deep-all-the-time is a performance hit that we don't want to be default. Svelte and Ember take this approach of opt-in-deep reactivity.

There are no comments on this comment yet.