You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In current frameworks, when a signal stores an array, mutating the array in-place does not trigger a change, as the new & previous objects are the same instance.
In my experience with the Signal API, this is a common source of subtle errors.
Is there any prospect of supporting 'change' subscriptions for the various builtin collection types (array/set/map/weakmap/bytearray/), so that eg a Signal<Array<number>> automatically notifies subscribers when signal.value.push(4) is called?
The text was updated successfully, but these errors were encountered:
I still have some concerns about it being easy to accidentally use a non-signal array - would it make sense for signals to eg wrap array / object values by default, or log a warning in the developer console when a non-signal array is passed?
In current frameworks, when a signal stores an array, mutating the array in-place does not trigger a change, as the new & previous objects are the same instance.
In my experience with the Signal API, this is a common source of subtle errors.
Is there any prospect of supporting 'change' subscriptions for the various builtin collection types (array/set/map/weakmap/bytearray/), so that eg a
Signal<Array<number>>
automatically notifies subscribers whensignal.value.push(4)
is called?The text was updated successfully, but these errors were encountered: