Closed domenic closed 5 years ago
Array.from, as an inspiration also allows mapping by default as second argument
http://exploringjs.com/es6/ch_arrays.html#sec_new-static-array-methods
So I guess just calling it fromArray
ie fromArray(array, mapFunc?, thisArg?)
would suffice.
Right now if you want to have an ItemSource that converts your "model" into your "view model" you'd do something like this:
We may want to make this easier, so you could write something like
We should not add this now, as it gets us deep into the model/view model management world. But I wanted to note it for later, in case we see this as a common pattern, so we have something to refer to.
Also, as noted in #103, this would likely see a lot more use if we end up with template instantiation integration. Or maybe if we did something like #101.