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
This could reduce the amount of boilerplate while working with signals
Arrays are often mutated, items removed and added, to/from the beginning/end, sorted
Numbers are often incremented, decremented or modified by some number
Object keys are often added/removed and sorted
This feature would be opt-out and would work as follows:
constnumber=signal(0);// Instead of thisnumber.set(number()+1);// It would detect a number type and would expose the following function "sum" for examplenumber.sum(1);number.sum(-1)// For arrayconstitems=signal([1,2,3]);items.push(1);items.pop();items.unshift();
Maybe only mention in the docs on how to do so? Because there can be various signal types and various ways to solve this. Angular has it in he core. If developer doesn't use it. It only increases the size of the framework.
The text was updated successfully, but these errors were encountered:
This feature would be opt-out and would work as follows:
Similar like vue.
https://vuejs.org/guide/essentials/list.html#array-change-detection
TODO
items.push()
or after getitems().push()
signalize/typed-signals
package?The text was updated successfully, but these errors were encountered: