How to filter/remove elements from an array within a Store
If I have the following
createStore
invocation:
What is the proper way to filter/remove an element from that cards
list? I have tried the following and I get yelled at by TypeScript saying it's incorrect.
Since the cards
field is at the top level, is the only option to reference the previous value of the store?
3 Replies
why does
fail?
but regardless this option might be more desirable
as the one above can leave "holes"
Even the TodoMVC demo uses
filter
.
The underlying advantage is that even subscribers of just .length
(or the array itself) will also rerun.that is a good points setting to undefined leaves holes and does not change the length
this is what the todo app does