Add mapping function as the second param for Getter
maksnester opened this issue · 2 comments
maksnester commented
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
mduqueoviedo commented
Isn't this enough?
maksnester commented
@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.