ktsn/vuex-class

Add mapping function as the second param for Getter

maksnester opened this issue · 2 comments

Would be nice to have additional mapping function as we have already for State. To be able to do something like that:

@Getter('some', (val) => val.map(item => item.id)) someIds

Isn't this enough?

@mduqueoviedo I don't remember what problem I tried to solve, but solution from your link looks good to me.

In case when custom function is needed - @State accepts mapping fn. Getter is possible to just call, no point to change getter with mapping function I think.